function hoisting like var

Ingvar von Schoultz ingvar-v-s at comhem.se
Sat Jul 26 06:06:55 PDT 2008


Igor Bukanov wrote:
> 2008/7/26 Ingvar von Schoultz <ingvar-v-s at comhem.se>:
>> Do you really think {{ }} appears in existing code, correctly
>> enclosing statement blocks, with the {{ and the }} placed tightly
>> together both at the beginning and at the end?
> 
> Yes: I have seen the code like
> 
> if (x) {
>    {
>       code
>    }
> }
> 
> Now pass through a JS compressor that removes redundant whitespace and
> you get precizelly {{ }}.
> 
> In addition, those {{ can happen in a code generator.
> 
> Regards, Igor
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss
> 

How sad! It seemed such a simple and intuitive notation!

I think all of these would be unambiguous:

     {. code .}

     {: code :}

     {| code |}

     {[ code ]}

     [[ code ]]

     [ code ]

-- 
Ingvar von Schoultz

------- (My quirky use of capitals in code comes from my opinion that
reserved and predefined words should all start with lowercase, and
user-defined should all start with uppercase, because this will easily
and elegantly prevent a host of name-collision problems when things
like programming languages are upgraded with new labels.)



More information about the Es4-discuss mailing list