On 22 March 2012 07:33, Brendan Eich <[email protected]> wrote:

> David Herman wrote:
>
>> On Mar 21, 2012, at 9:28 PM, John J Barton wrote:
>>
>>  equals makes sense when it is assigment:
>>>
>>>   module Bar = load("bar.js");
>>>
>>
>> It's not an assignment, though. Which is why Brendan didn't like it in
>> the first place, since he felt programmers would get confused that it was a
>> dynamic assignment expression statement.
>>
>> OTOH, this confusion can't exactly last long, when the parser won't even
>> parse your program. I'm not sure that confusion is really worth worrying
>> about.
>>
>
> But why make misleading syntax? More of a question for John: why write
> |load("bar.js")| there, looking for all the world like a function call
> evaluated in order at runtime, when this is a special form evaluated before
> runtime?


I still wonder why you think it is so confusing to use the equality sign
for module bindings. It is overloaded to mean "define as" and "assign" in
almost all language that use it for the latter, and for different semantic
categories, too. I never witnessed anybody being confused by that.

I agree, though, that '=' is somewhat weird with a plain string on the RHS
(but so is 'is'). Personally, I could get used to that, but maybe some
variant with 'at' is more appropriate.

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

Reply via email to