On 2014-10-01, 1:20 PM, Till Schneidereit wrote:
    That's a great point.  It would be great if we can adopt
    https://wiki.mozilla.org/WebAPI/ExposureGuidelines for new JS
    fatures as well.


Yes, I think we should consider that. The situation is somewhat
different in that we usually only implement features that are stable,
specced, and agreed upon by tc39 and thus have buy-in by other vendors.
("Usually" because we do some experimental Nightly-only stuff, but that
is so exotic, really, that FF devs wouldn't begin to think that it's
production-usable.)

Sure, but I think it would still be valuable, even if it's only used as an announcement mechanism.

    Also, out of curiosity, do we have ways of hiding JS built-ins
    behind prefs similar to DOM APIs?


Not really: by the time the prefs are read, we have already created
globals, so those either have the builtins (if we default to installing
them) or won't ever get them, regardless of the pref's value (if we
default to not installing them).

Hmm.. I'm not sure about the details of the code in question. Is this easy to solve? At what point exactly during startup do we create those built-ins?

Also, I think there is great value in having these features available
without a pref. Chrome uses prefs, and I think is substantially
diminishes the value for testing things out. Array.prototype.contains is
a good example for that: if it had been behind a pref, who knows when
we'd have discovered the web breakage?

I was not suggesting that we should have landed Array.prototype.contains behind a pref. However, there are other uses for being able to hide things behind a pref. One great example is this pattern:

#ifdef NIGHTLY_BUILD
pref("what.ever", true);
#else
pref("what.ever", false);
#endif

This basically ensures that we don't accidentally end up letting the feature slip past Nightly before we're "ready" (part of the definition of ready might be, knowing that the feature is Web compatible, etc.)
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to