Fwd: Re: insteadof operator

Salvador de la Puente González salva at unoyunodiez.com
Fri Jun 26 00:42:48 UTC 2015

If the outer name collides with your inner name its because the meaning of
the outer name inside the new context has changed. So, find a better name.

For the path example, what is wrong is the name of the package. You can
replace with pathtools for instance.

And remember you always can use the explicit global object to avoid
El 25/6/2015 17:37, "joe" <joeedh at gmail.com> escribió:

> [sorry forgot to reply to all]
> ---------- Forwarded message ----------
> From: "joe" <joeedh at gmail.com>
> Date: Jun 25, 2015 5:34 PM
> Subject: Re: insteadof operator
> To: "Bergi" <a.d.bergi at web.de>
> Cc:
> Would there be any security issues? Also,  runtime or lexical scope?
> I've actually wanted this feature for a while now, but  always assumed it
> had no chance of happening due to security issues. Of course, I know
> nothing about security so I could be wrong.
> On Jun 25, 2015 4:48 PM, "Bergi" <a.d.bergi at web.de> wrote:
>> Bucaran schrieb:
>>  It would be nice if there was a special construct like `typeof` or
>>> `instanceof` that would take a name and evaluate to whatever
>>> variable / function of the same name existing in the parent scope (or
>>> undefined otherwise).
>> Sorry, no. Please not.
>> This would be a horrible feature, making name collisions (which are
>> already confusing as hell at times) even more confusing. Scoping is already
>> complicated, no need to introduce an edge case that all tooling (including
>> human brains) would need to get learned.
>> There already does exist a simple, familiar, and working solution (well,
>> multiple ones actually), it's not worth the trouble of introducing a new
>> operator.
>>  Bergi
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
> _______________________________________________
> 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/20150626/a3a6bbd8/attachment-0001.html>

More information about the es-discuss mailing list