Re: Callable values: trying to summarize

2012-03-12 Thread Axel Rauschmayer
Makes sense. I keep thinking that this kind of decision should (optionally) be made globally, possibly along with specifying exceptions for directories with legacy code. Kind of like one can specify the Java versions in Eclipse on a per-project basis. Apart from a meta tag, the module loader is

Re: Callable values: trying to summarize

2012-03-12 Thread Aymeric Vitte
I was not aware of this document when I wrote : https://mail.mozilla.org/pipermail/es-discuss/2012-March/021050.html Reading my post again, it's indeed not clear at all that I was referring more to the syntax than block lamdas's principles and that this should behave as block lambdas,

Callable values: trying to summarize

2012-03-11 Thread Axel Rauschmayer
== Arrow syntax == The nicest proposal I have seen has been written by David Herman: https://gist.github.com/2011902 == More traditional solution == 1. Short notation for non-TCP functions: use fn; enables one to abbreviate function as fn [1]. Optional, not sure if that’s a good idea: Implicit

Re: Callable values: trying to summarize

2012-03-11 Thread François REMY
Subject: Callable values: trying to summarize == Arrow syntax == The nicest proposal I have seen has been written by David Herman: https://gist.github.com/2011902 == More traditional solution == 1. Short notation for non-TCP functions: use fn; enables one to abbreviate function as fn [1

Re: Callable values: trying to summarize

2012-03-11 Thread Axel Rauschmayer
BTW, if we are still going to make 'fn' optionnal, I have one small question: wouldn't it better to allow functions without introductory keyword instead? If it's optionnal, it's up to the developer that uses it to make sure his code is compatible, which seems fine to me. With introductory

Re: Callable values: trying to summarize

2012-03-11 Thread Axel Rauschmayer
To: François REMY Cc: es-discuss Subject: Re: Callable values: trying to summarize BTW, if we are still going to make 'fn' optionnal, I have one small question: wouldn't it better to allow functions without introductory keyword instead? If it's optionnal, it's up to the developer that uses it to make

Re: Callable values: trying to summarize

2012-03-11 Thread Claus Reinke
The nicest proposal I have seen has been written by David Herman: https://gist.github.com/2011902 Commenting on the gist proposals: G1. shorter function syntax: (..) - {..}just sugar for function (..) {..} This looks like a strawman, not solving the issues. G2. lambdas:(..) =

Re: Callable values: trying to summarize

2012-03-11 Thread Allen Wirfs-Brock
see https://gist.github.com/2015544 for my current thougthts Allen On Mar 11, 2012, at 11:20 AM, Axel Rauschmayer wrote: == Arrow syntax == The nicest proposal I have seen has been written by David Herman: https://gist.github.com/2011902 == More traditional solution == 1. Short

Re: Callable values: trying to summarize

2012-03-11 Thread Axel Rauschmayer
+1 Great. Very JavaScript-y syntax, easy to parse. David’s `do {}` fits in nicely as an IIDE (immediately-invoked do expression). In fact, your proposal does indeed seem like a natural evolution of `do {}` (TCP, completion value semantics, etc.), rather like a “parameterized do”. I like `use

Re: Callable values: trying to summarize

2012-03-11 Thread Brendan Eich
Axel Rauschmayer wrote: I like `use fn`, but it’s not yet clear to me how it interacts with modules (including, possibly, `use module`) use module; was withdrawn. use fn; is just a pragma to make fn short for function. You can still write 'function' out. . I would prefer to have an “all