return-from-lambda viewed as dangerous, good alternatives
Mark Mahieu
markmahieu at googlemail.com
Sat Jan 9 00:04:31 PST 2010
On 9 Jan 2010, at 07:11, Neal Gafter wrote:
> On Fri, Jan 8, 2010 at 4:29 PM, Stefan Schulz <schulz at the-loom.de> wrote:
>> I'd suspect that in the sense of this proposal, a lambda is (like in,
>> e.g., Ruby) what FCM defined as "anonymous inner method", which also
>> clarifies its behaviour wrt. non-local return. It does not prevent,
>> however, from adding another language construct for control abstraction
>> or closures (Blocks in Smalltalk) later on with a syntax distinct from
>> methods (e.g. old BGGA syntax). As I mentioned Ruby, it provides
>> different constructs for lambda and closure (proc).
>
> It would be a shame to need a third, fourth, or fifth closure-like
> construct. (Ruby has about seven)
>
Yes, there are 7 in Paul Cantrell's famous document [1] although he casts his net fairly wide in attempting to understand them.
He does list some real gems though (pardon the pun) - the way some code changes its meaning between Ruby 1.8 and 1.9 is pretty hair-raising.
Mark
[1] http://innig.net/software/ruby/closures-in-ruby.rb
More information about the lambda-dev
mailing list