[Webkit-unassigned] [Bug 31813] Add support for block scope const
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 17 08:52:07 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=31813
--- Comment #10 from Andy Wingo <wingo at igalia.com> 2011-11-17 08:52:07 PST ---
Thanks for the notes, Gavin.
(In reply to comment #5)
> I guess there are really three options here - always allow block const, only allow based on state external to the script, (<script> tag or command line parameter), or a "use strict" style pragma in-band. Whilst it doesn't currently sound like the ES committee are going to go for another "use strict" like directive, this might be useful for internal development purposes (e.g. "use webkit-harmony").
I'm open to any of these. FWIW as I noted V8 went with the "external state" solution. I don't know what the right answer is.
> I doubt anyone relies on the precise behavior of our crufty function-scoped const, so it may end up making sense to replace the classic const implementation with a block-scoped one, rather than supporting multiple incompatible behaviors.
Again, just for what it's worth, V8 preserved the old behavior and added a new const_harmony mode. I really don't have a good idea about what enabling block const would do in a broader web context.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list