Fixing the associativity / precedence of the instanceof operator

Charles Pick charles at codemix.com
Tue Aug 26 02:48:01 PDT 2014


Ok, what if `!foo instanceof Foo` became a strict mode error instead?


On Mon, Aug 25, 2014 at 12:08 PM, Till Schneidereit <
till at tillschneidereit.net> wrote:

> On Mon, Aug 25, 2014 at 1:01 PM, Charles Pick <charles at codemix.com> wrote:
>
>> I agree that this could cause some problems, however, that code has never
>> been correct in the first place. It's the equivalent of writing `if (false)
>> {...}`. Seems like it's reasonable to fix something if it only has an
>> impact on code which is already broken.
>>
>
> The logic might be broken, yes, but the application's observable behavior
> might not. At least not so much as to make the application unusable. E.g.,
> an application might turn from always showing some info where the developer
> intended it to not be shown under exceptional circumstances to never
> showing it. A form might go from always marking a field as valid to never
> doing so, making it impossible to commit and the application unusable in
> its entirety.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140826/7fd65f50/attachment.html>


More information about the es-discuss mailing list