on Friday, Nov 23rd 2007 at 13:12 -0000, quoth Uri Guttman:

=>
=>too long has this list been quiet. but i have a fun question. i am
=>writing up slides for an all about hashes class. one goal i have is to
=>list and explain as many different uses for hashes as reasonably
=>possible. i have a short list to start with but i am sure the hive mind
=>of fwp can scrape up a bunch more. each one should have a name and not
=>overlap too much with any of this list (my initial list should be
=>obvious to you).
=>
=>      dispatch table
=>
=>              call code ref based on a key
=>

I admit I'm better with python these days than I am with perl, but one of 
the caveats that the dispatch table should be taught with is that 
selecting the correct code ref is different from calling through it.

Given:
        table = { ... }

eg 
        ref = table{ expr }
        ref()

is different from
        table{expr}()

The latter can be a bear to debug ;-)
        
-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net

Reply via email to