Jorge wrote:
If short function syntax and block lambdas are mutually exclusive, then the 
block lambdas' syntax should be considered as an alternative for short function 
syntax, that is, {| params | /* body */ } is a perfectly valid candidate for 
short functions, without TCP.

No, based on Ruby and Smalltalk precedent this syntax implies TCP. If you don't like TCP, use function-based shorter syntax. The choice is clear enough, and "crossing the streams" is simply going to make for more confusion, all else equal.

And given that `this` is an invalid name for a parameter, to indicate a bound 
this we could simply include it in the parameters list:

{|this, arg1, arg2| /* body */} bound `this`
{|arg1, arg2| /* body */} unbound `this`

The "Harmony of My Dreams" era had this optional leading |this| formal for #-functions but we did not agree on this-parameterization. What is the parameter's default value? Can .apply/.call override?

Again block-lambdas are TCP-only by their heritage. No unbound-this, no arguments, break/control/return affect enclosing function control flow. Mixing up block-like syntax and function-like semantics is strictly worse than any alternatives that hew one way or the other.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to