Re: Legacy const, attempt 2 (Re: Legacy const)

2012-04-19 Thread gaz Heyes
On 18 April 2012 19:13, Geoffrey Sneddon gsned...@opera.com wrote: I've just had it pointed out to me that my original email made little sense, so let's try again: const has historically been needed in non-strict/strict code for web compatibility on non-IE code (typically either down to

Re: Legacy const, attempt 2 (Re: Legacy const)

2012-04-19 Thread Brendan Eich
gaz Heyes wrote: IE has consts, use execScript with vbs. I think Andrea did a blog post on it: http://webreflection.blogspot.co.uk/2007/10/cow-javascript-define-php-like-function.html Any port in a storm, but c'mon -- we're talking about 'const x = 42;' written in JS. That has never been

Re: Legacy const, attempt 2 (Re: Legacy const)

2012-04-19 Thread Allen Wirfs-Brock
On Apr 19, 2012, at 10:58 AM, Brendan Eich wrote: gaz Heyes wrote: IE has consts, use execScript with vbs. I think Andrea did a blog post on it: http://webreflection.blogspot.co.uk/2007/10/cow-javascript-define-php-like-function.html Any port in a storm, but c'mon -- we're talking about

Legacy const

2012-04-18 Thread Geoffrey Sneddon
const is needed in non-strict/strict code, as well as in Harmony code, has historically been needed for web compatibility on non-IE code. Chakra interestingly doesn't support it. (May simply be a case of it being IE and not fed code that realizes upon it.) Either we should spec it, likely

Re: Legacy const

2012-04-18 Thread Allen Wirfs-Brock
Const is spec'ed in the ES6 draft for all modes (there is really only strict and non-strict, no longer a Harmony mode). It is block scoped. If anybody wants to update their current implementation ahead of ES6 that's that they should for the ES6 draft spec.. Note that current interoperable

Legacy const, attempt 2 (Re: Legacy const)

2012-04-18 Thread Geoffrey Sneddon
I've just had it pointed out to me that my original email made little sense, so let's try again: const has historically been needed in non-strict/strict code for web compatibility on non-IE code (typically either down to server-side UA sniffing or just explicitly non-support of IE). IE still

Re: Legacy const, attempt 2 (Re: Legacy const)

2012-04-18 Thread Brendan Eich
Geoffrey Sneddon wrote: As such, we should spec it: likely block-scoped in modules, and function-scoped otherwise. We should only really not spec it if we can get everyone who currently supports it to drop it. The TC39 group met early this year (IIRC it was the Yahoo!-hosted meeting in

Re: Legacy const, attempt 2 (Re: Legacy const)

2012-04-18 Thread Oliver Hunt
On Apr 18, 2012, at 11:32 AM, Brendan Eich bren...@mozilla.org wrote: Geoffrey Sneddon wrote: As such, we should spec it: likely block-scoped in modules, and function-scoped otherwise. We should only really not spec it if we can get everyone who currently supports it to drop it. The