Mike Shaver wrote:
> On Sun, Oct 12, 2008 at 9:29 AM, David-Sarah Hopwood
> <[EMAIL PROTECTED]> wrote:
>>  - the hoisting behaviour of 'const' should be the same as 'let',
>>   because:
>>    * it doesn't need to hoist for backward compatibility, unlike 'var';
> 
> Not for compatibility with the standard, but const as implemented in
> at least 2/4 (not sure about JSCore) hoists, I believe.

You mean code like this?

(function () {
  print(x);
  { const x = 42; }
})();

(calls 'print(undefined)').

What is the point of compatibility with such code?

-- 
David-Sarah Hopwood
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to