[Webkit-unassigned] [Bug 31813] Add support for block scope const

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 16 06:56:28 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=31813





--- Comment #2 from Andy Wingo <wingo at igalia.com>  2011-11-16 06:56:28 PST ---
So that's the spec, as it appears to be shaping up.  As far as implementation goes, SpiderMonkey and V8 appear to be choosing different strategies:

  V8: https://mail.mozilla.org/pipermail/es-discuss/2011-November/018480.html
  SM: https://mail.mozilla.org/pipermail/es-discuss/2011-November/018462.html

V8's approach is more conservative, preferring to add a mode rather than to add `const' to strict mode.

SM is more optimistic (for better or for worse); they seem to think they can migrate their users to block-scoped `const' and everything will be fine.

JSC currently forbids `const' in strict mode, and has some crufty function-scope support for `const' in classic mode.

Now here's the thing, JSC currently has no harmony "mode": there's just strict and non-strict.  We have to make a choice as to whether to continue like this and support some subset of harmony features within strict mode, or to add another mode, or to decide not to implement harmony, such as it is.

My motivation here is that I have a bunch of SM code that uses let, const, and destructuring, and I would like to convert it to use JSC.  I would appreciate feedback from JSC folk as to whether this is a good idea, or whether I should use another engine.  If you are amenable to block scoping somehow, I am happy to implement it.

Andy

-- 
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