in reply to Re^3: Is Perl a good career move?
in thread Is Perl a good career move?
Heck, it doesn't even have anonymous functions.Yes it does. (...) create_function.
Functions created by create_functions are NAMED, not anonymous. In fact, create_function RETURNS the name.
I'm not sure if you could consider that as two separate expressions, but it seems a concise enough idiom for me.
I sure do. If in "bar() ? bar() : $foo", the bar function does something impure, like increase a counter, it does so twice, while with Perl's "bar() || $foo", it is done only once. Also, if bar() takes 10 seconds to finish, then "bar() ? bar() : $foo" will take at least 20.
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Is Perl a good career move?
by thinker (Parson) on May 24, 2005 at 15:46 UTC | |
by Juerd (Abbot) on May 24, 2005 at 16:16 UTC | |
Re^5: Is Perl a good career move?
by Anonymous Monk on Jan 02, 2008 at 20:05 UTC | |
by Juerd (Abbot) on Jan 04, 2008 at 00:46 UTC |
In Section
Meditations