Front page | perl.fwp |
Postings from November 2007
Re: fun with hashes!
From: Uri Guttman
November 25, 2007 09:04
Re: fun with hashes!
Message ID: email@example.com
>>>>> "JDP" == John Douglas Porter <firstname.lastname@example.org> writes:
JDP> Uri wrote:
>> is a key valid? (not same as in a set).
>> isa usually works on fixed sets of keys
JDP> Well, in a strict sense it IS the same, as it is just one
JDP> of many possible set operations. I suppose you could say
JDP> it's a subset of sets. :-) I think you're trying to focus
JDP> on the difference between sets of strings, which are the
JDP> hash keys() directly, and sets of other things (e.g. objects),
JDP> which are hash values(). You also emphasize the const-ness
JDP> of the "isa" key set, which I think is rather too narrow.
JDP> I think a better approach would be to talk about sets in
JDP> general, the many set operations (including the *missing*
JDP> operations, which have to be kludged in Perl), the set-
JDP> related CPAN modules, and how all these things can be used.
JDP> JMHO. Sorry if someone already made this point and I missed
i do plan on covering sets in their own right along with intersection
and union operations too (right out of the FAQ). but i still think isa
is a (sic) concept that is important enough to cover on its own. sure it
is a set but a very specific type with its own name. the names of these
concepts are important (almost like design patterns which i despise
:). i have seen too many newbies and even some mildly experienced perl
hackers don't know all these hash uses (or their names). ever see the
(virtual) glassy eyes when you mention dispatch tables in polite public?
i am aiming this for my class which is a mix of experienced hackers down
to some ex-cobol coders who code perl because they get paid for it. and
it is also for future classes or writings. so i want to cover as many
uses at a basic level and not get into subtleties such as which are
really variations of each other. they are all hash variations when you
come down to that so the context and name of each use must be clearly
i will post here the url for these slides (with mistakes! :) when i get
them done. please be kind. :)
Uri Guttman ------ email@example.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org