Small Proposal "!in"
isiahmeadows at gmail.com
Wed Jul 11 17:33:01 UTC 2018
Let me compound on that: Kotlin has a `!in` for "not in collection" and
`!is` for "not an instance of". I've been using that language quite a bit
lately out of necessity (better than Java, and all the other alternatives
suck in some way), and those two operators just feel *wrong* to type. It's
to the point I'm sometimes coding my way *out* of writing them. (No other
feature uses this symbol except for literal logical negation.)
Oh, and as I mentioned before, `key in object` checks the prototype chain,
which in my experience is not the thing you usually want to do.
So I agree this is a Really Bad Idea™, for this above if not the Kotlin
On Wed, Jul 11, 2018, 11:24 Alex Vincent <ajvincent at gmail.com> wrote:
> ---------- Forwarded message ----------
>> From: Andrea Giammarchi <andrea.giammarchi at gmail.com>
>> To: Jordan Harband <ljharb at gmail.com>
>> Cc: "es-discuss at mozilla.org" <es-discuss at mozilla.org>
>> Date: Wed, 11 Jul 2018 16:23:03 +0200
>> Subject: Re: Small Proposal "!in"
>> and, as previously mentioned, `!obj.x` might have side effects through
>> the accessor, as example in every lazily defined property that would be
>> early defined (or anything else behind a getter that could do more than
>> just telling the property is there and it's not truthy).
> Peanut gallery observation: I personally think !in is a Really Bad Idea,
> or at least I'm not convinced that it's particularly useful. If it is
> useful, then let one of the transpiling languages like CoffeeScript or
> TypeScript demonstrate it first.
> Also, there's the little matter of pronunciation. I admit to a bit of
> snarkiness when I first saw this proposal, but I didn't expect it to have
> "bangin' " language?
> "The first step in confirming there is a bug in someone else's work is
> confirming there are no bugs in your own."
> -- Alexander J. Vincent, June 30, 2001
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss