[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: omit parenthesis for functions of zero arguments / customcontrol structures
- From: Bret Victor <bret@...>
- Date: Tue, 28 Feb 2006 10:00:11 +0000 (UTC)
Lisa Parratt writes:
> > I mention this in part because in Perl
>
> Why does everyone always suggest features from that aborted
> abomination of a language, rather than ones from SPARK, Z, or other
> languages with a bit of class and back bone?
Well, the feature in question (syntactically sugary closures) is in Smalltalk
and (therefore) Ruby, both of which have class. (Or, at least, classes.)
I imagine Perl adopted it from there.
I'm personally a fan of any syntax that makes abstraction easier to type.
Lua: function () return foo + bar end
Smalltalk: [ foo + bar ]