Re: bad code to good golf
Uri Guttman <[email protected]> Mon, 10 Dec 2007 08:56:47 -0500
| Newsgroups | gmane.comp.lang.perl.fun |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "AP" == A Pagaltzis <[email protected]> writes: AP> * shmem <[email protected]> [2007-12-10 12:55]: >> Well, if we were to return an array reference instead of a hash >> ref, >> >> sub new{bless\@_,shift} AP> In contrast, the hash constructors make a *copy* of the array, AP> and that copy will not be affected but subsequent modifications AP> to the source array. and that is beside that point that it totally is broken. the specified API is a list of key/value pairs. how would an array of those be used as an object? i don't feel like doing a linear search to get arg values. if i wanted that i would use lisp assoc lists! :) uri -- Uri Guttman ------ [email protected] -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org