Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Modern Perl: The Book: The Draft

by ww (Archbishop)
on Jul 06, 2010 at 16:44 UTC ( [id://848279]=note: print w/replies, xml ) Need Help??


in reply to Re: Modern Perl: The Book: The Draft
in thread Modern Perl: The Book: The Draft

At least one source, the free online dictionary (favored by Google when a search is bound to 'dict'), gives chromatic's use as the second choice for 'determine' when used transitively. Personally, I disagree, particularly in this context: 'determine' in the sense of 'ascertain' appears close to optimal.

"stow" may be otherwise; perhaps "store"?

But lest any take jethro's reference to his relationship with English as an adverse indicator, my view is that his use of the language puts to shame much of what we see here from individuals whose status as "native English speaker(s)" is self-evident.

Replies are listed 'Best First'.
Re^3: Modern Perl: The Book: The Draft
by jethro (Monsignor) on Jul 07, 2010 at 00:39 UTC

    Could it be that you and Anonymous Monk made the same mistake as I did initially of reading the example as if age() was meant as a read-only function?

    As I understand the example, age() is a write-only(!) function, you set the time you want to stow away the cheese in a dark cellar (or you simply stow away the cheese a predetermined time). The following sentence in the book makes that quite clear I think. So 'ascertain' would be exactly the wrong meaning, suggesting reading of a stored value.

    If I'm right, you made my point ;-). And in any case thanks for the compliment.

    PS: If I'm right, the second age() call in the example following the cheese paragraph should have a parameter of "6", "6m" or "6 months"

      /me headslaps self.

      In fact, jethro's take is far more plausible than the view behind my dissent.

      From the times of two postings on the topic by an Anonymonk, the content of the direct reply to jethro's node seems to be a retraction of Re^2: Modern Perl: The Book: The Draft... but the notion of age() as a mutator does fit the fact that aging cheese changes (mutates) its character. :-)

      Thus, a re-dissent on that tangential matter: IMO, 6 months is singularly inadequate for sharp! cheddar; far better 12 ...or even, as some of our Wisconsinites pride themselves on doing, for 12 years or more. But, that re-dissent is posited on the notion that the methods used by those in America's dairyland as determined by empirical testing.

      ++ again, jethro

        as a mutator does fit the fact that aging cheese changes (mutates) its character. :-)

        It also makes the cheese unavailable for sale, since it is in storage :)

      I made the mistake of not looking at the paragraph and associated code.
      Of course, the mere existence of a method called name() or age() does not by itself imply the behavior of that object. A Dog object may have an age() which is an accessor such that you can discover $rodney is 8 but $lucky is 3. A Cheese object may have an age() method that lets you determine how long to stow $cheddar so that it becomes sharp; in other words, age() may be an accessor in one class but not in another:
      # how old is the cat? my $years = $zeppie->age(); # store the cheese in the warehouse for six months $cheese->age();
      I would lose the code and change the sentence to
      A Cheese object may have an age() method that stores the cheese in the warehouse for six months; in other words, age() may be an accessor in one class but a mutator in another.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://848279]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-24 16:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found