Observing whether a function is strict

G. Kay Lee balancetraveller+es-discuss at gmail.com
Thu May 26 08:43:44 UTC 2016

I was under the impression that strict mode is a (temporary) workaround to
get rid of unwanted bad parts of the language without instantly breaking
anything. The long term question thus should be: do we have a timeline on
the final removal of non-strict behavior from the language, and establish
the "strict mode" as the one and only standard behavior. If so, then
introducing any additional language feature to help detecting
strict/non-strict is certainly not ideal.

As a side note - if we're gonna have Traits in ES I'd really like to see
something like Scala's `class CollegeStudent extends Student with Worker
with Underpaid with Young`, but the valuable `with` keyword is currently
occupied by a phantom from the language's rugged past. I'd really like to
see these ghosts from the past being removed from the spec once and for all
instead of being hidden behind some doors with a "DONT TOUCH" sign on it.

On Thu, May 26, 2016 at 4:06 PM, Claude Pache <claude.pache at gmail.com>

> > Le 26 mai 2016 à 09:57, Mathias Bynens <mathiasb at opera.com> a écrit :
> >
> > On Thu, May 26, 2016 at 9:48 AM, Claude Pache <claude.pache at gmail.com>
> wrote:
> >> I was wondering whether there is a way to observe whether a given
> random function is strict (or sloppy, or neither).
> >> […] Are there other ways? (If not, I find it somewhat unfortunate that
> only such nonstandard features leak this information.)
> >
> > I smell a proposal for `Reflect.isStrict` in the making…
> (To be clear, I would be strongly opposed to such a proposal: Being strict
> or not is an implementation detail that the consumer need not know.)
> —Claude
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160526/cc44c6fc/attachment.html>

More information about the es-discuss mailing list