develooper Front page | perl.perl6.language | Postings from March 2005

Re: Config Variables

Thread Previous
Larry Wall
March 3, 2005 11:33
Re: Config Variables
Message ID:
On Thu, Mar 03, 2005 at 11:25:04AM -0800, Larry Wall wrote:
: Well, hey, we've said that any object can behave as a hash of its
: public accessors, so it really don't matter which way they write it.

I guess another practical difference is that if you say


you get an undefined value, whereas if you say


it throws an exception.  Though I suppose you could always say:


instead to force it to undef if the method can't be found.  But that's
getting kind of cluttery, and I still like the hash notation for its
visual pill.  It lets you focus in on the parameter name and sort
of ignore where its coming from.  The important thing to the user is
the "intsize", and not the fact that it had to be looked up in some
particular architecture object.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About