Opt-in versioning
Michael Haufe
TNO at TheNewObjective.com
Mon Jul 21 19:15:09 PDT 2008
Jon Zeppieri wrote:
> On Mon, Jul 21, 2008 at 8:58 PM, Michael Haufe <TNO at thenewobjective.com> wrote:
>
>> So let me see if I understand this argument correctly.
>>
>
> I generally agree with what you've written here -- just a couple of comments...
>
>
>> If I want the benefits of this blocking, does that mean I have to give
>> up some of my shorthand?
>>
>> (a === b) ? true : false;
>>
>> How would the block work in this case?
>>
>
> Not sure what you're getting at here. What block are you referring to?
>
>
>> The JavaScript 1.7 let statement is already the better block we need,
>> and instead of being a generic solution like the one you've suggested,
>> it has flexibility and doesn't force me to change the way I already code
>> things:
>>
>
> I'm partial to the let statement, too, but you should know that it's
> not being proposed for either ES3.1 or ES4. But yes, it makes the
> scope of the let-bound variables perfectly clear -- let vs. let*
> binding semantics aside. (Does the JS1.7 let statement bind
> sequentially or in parallel?)
>
> -Jon
>
>
>
I was basically asking if these two structures were supposed to be
equivalent and part of what he was suggesting:
if(a === b){
foo;
}
else{{
bar;
}}
_________________________________
(a === b) ? foo : {{ bar }};
More information about the Es4-discuss
mailing list