[self-interest] Re: Questions about Self
ungar at me.com
Tue Jun 28 03:35:40 UTC 2016
IMO, the biggest difference is the syntactic weight: "lambda" vs "".
Yes, the lack of a non-local return prevents the use of closures for control structures in many languages. The "maybe" monoid is an interesting alternative that could be viewed as a partial workaround in functional languages. Exceptions, too, sorta.
I've not looked at Pony yet.
- David (from iPad, typos likely)
> On Jun 27, 2016, at 6:44 PM, James Noble kjx at mcs.vuw.ac.nz [self-interest] <self-interest at yahoogroups.com> wrote:
> Dave wrote:
> > blocks are more basic than lambdas
> The biggest difference is that lambda syntax (being functional) almost always expect an argument;
> a function with no arguments doesn't make any sense. Block syntax is optimised to work well in the no-argument case.
> > in Scheme cond is a primitive, even though it could have been done differently
> the questions is whether you quote at definition side (Scheme) or use side (Smalltalk)
> Chris Double (hey two Kiwis in the same thread :-) wrote:
> > This is how the Pony programming language treats closures. They are sugar for objects with an apply method:
> yep, lots of langauges do that, incl. Java. The catch is: where does "return" return to?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Self-interest