NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
fun! (Score:1)
I like the /fun.*/ variants, 'fun' being my favorite.
fun add($x, $y) { $x + $y }
or perhaps
$add = fun($x, $y) { $x + $y }
eh? nice and short. Though now that I look at it, 'func' might be slightly more readable for the uninitiated. But they might have other problems with this fun insanity!
great! (Score:1)
now I have this song in my head...
"...conjunction junction, what's your function..."
procedure ;-) (Score:1)
I'd like to see "function" (or a variant) reserved for something carrying some promise of being side-effect free. That'd be useful for functional programming.
I'd suggest "procedure" or something like it for ordinary subs. I wouldn't even consider trying mixing prototypes and signatures, so I'd like to keep "sub" as is.
That way, you've covered three major programming styles.
Re: (Score:2)
proc would work nicely.Short is good (Score:1)
I'd like to keep it short, i.e. "fun" or "def". "procedure" feels like lower-case COBOL.
lambda (Score:2)
(or, you could use the actual greek symbol)