>> Is this a proposed syntax?
No- It was an off the cuff reaction

> Suggestion: do not mail syntax 
Noted

On 25 Mar 2011, at 17:34, Brendan Eich <[email protected]> wrote:

> It's totally ambiguous.
> 
> Suggestion: do not mail syntax ideas without working through (pencil and 
> paper, Jison/Bison/Antlr/something, or better) the grammar.
> 
> More specific suggestion: don't bikeshed function syntax without a new prefix 
> character or a convincing top-down parsing story. If you don't know what 
> top-down vs. bottom-up means, find out first.
> 
> /be
> 
> On Mar 25, 2011, at 10:32 AM, Mike Samuel wrote:
> 
>> 2011/3/25 David Foley <[email protected]>:
>>> Implicit functions?
>>> 
>>> globalMethod(argument)
>>> {
>>>    // implementation
>>> };
>>> AnObject.prototype.method(value)
>>> {
>>>    // whatevs
>>> };
>> 
>> Is this a proposed syntax?
>> 
>> If so, in the presence of semicolon insertion, isn't this ambiguous with
>> 
>> globalMethodCall(argument);
>> {
>> // block
>> }
>> ;  // noop
>> AnObject.prototype.methodCall(value);
>> {
>> // another block
>> }
>> ;  // noop
>> 
>> 
>>> On 25 Mar 2011, at 17:28, Kevin Smith <[email protected]> wrote:
>>> 
>>> Oh, boogers!  : )
>>> 
>>> On Fri, Mar 25, 2011 at 1:24 PM, Mike Samuel <[email protected]> wrote:
>>>> 
>>>> 2011/3/25 Kevin Smith <[email protected]>:
>>>>> As a simple matter of taste, I find the # symbol to be quite ugly and
>>>>> have
>>>>> been thinking of alternatives for shortening function expression syntax.
>>>>> In working with my own wonky version of promises, I continue to make the
>>>>> same typing error over and over again.  This is something like what I
>>>>> mean
>>>>> to type:
>>>>> obj.doSomething().then(function(val, err)
>>>>> {
>>>>>    ...
>>>>> });
>>>>> But I find myself typing this instead:
>>>>> obj.doSomething().then(val, err)
>>>>> {
>>>>>    ...
>>>>> });
>>>>> The problem isn't so much the extra typing of the "function" keyword,
>>>>> but
>>>>> the profusion of parens.  I'd like to suggest the following form
>>>>> instead.
>>>>> obj.doSomething().then(<val, err>
>>>>> {
>>>>>    ...
>>>>> });
>>>>> Correct me if I'm wrong, but since expressions cannot start with "<",
>>>>> this
>>>>> shouldn't present any problems for a top-down parser.  Is that right?
>>>> 
>>>> Does this cause ambiguities with E4X ?
>>>> https://developer.mozilla.org/en/e4x
>>>> 
>>>>> Thanks,
>>>>> khs
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> es-discuss mailing list
>>>>> [email protected]
>>>>> https://mail.mozilla.org/listinfo/es-discuss
>>>>> 
>>>>> 
>>> 
>>> _______________________________________________
>>> es-discuss mailing list
>>> [email protected]
>>> https://mail.mozilla.org/listinfo/es-discuss
>>> 
>>> _______________________________________________
>>> es-discuss mailing list
>>> [email protected]
>>> https://mail.mozilla.org/listinfo/es-discuss
>>> 
>>> 
>> _______________________________________________
>> es-discuss mailing list
>> [email protected]
>> https://mail.mozilla.org/listinfo/es-discuss
> 
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to