-
Website
http://paulmwatson.com/journal -
Original page
http://paulmwatson.com/journal/2006/07/28/functions-as-arguements/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
aidanf
1 comment · 3 points
-
keithbohanna
1 comment · 1 points
-
martinmurphy
1 comment · 1 points
-
jufemaiz
1 comment · 1 points
-
lxsg
1 comment · 1 points
-
-
Popular Threads
I think Java has something similar.
This is a reasonably common feature in dynamic languages like Perl, Python and Ruby.
some of the things it allows are mindblowing; it gets even better when variable scoping is modified to allow "closures". You know the java pattern whereby you need to define an interface to receive a callback, then callers need to define instances of that interface etc. etc.? That becomes a single line of code in perl ;) it's truly beautiful in terms of simplification and readability.