Small Proposal "!in"

T.J. Crowder tj.crowder at
Wed Jul 11 17:51:12 UTC 2018

On Wed, Jul 11, 2018 at 4:51 PM, Alex Vincent <ajvincent at> wrote:
> In Linux programming, #!/bin/bash is very commonly the first line of a
> script. In Python, we have #!/bin/python, or #!/bin/perl.  The #!
> are pronounced "she-bang", because # is pronounced "hash" and ! is
> pronounced "bang".

Indeed. But in JavaScript (and Java and C and C# and...), `!` is "not", and
I for one read it that way when reading anything other than bash script. I
don't read `!==` as "bang equal," either. (Which in British English would
be really misleading...)

And that's why I like the idea of `!in` (or `notin`), because I'd much
rather read and write "if property not in object" than "if not property in
object" (and don't get me started on the parens required to make it work
:-) ).

To me, `!in` or `notin` or whatever you want makes perfect sense, just like
we have `!=` and `!==`. It's like not having `!==` and then arguing we
don't need to have it because after all, you can write `n != 1` as `!(n ==

Heck, all we really need is NAND gates, right? ;-)

On Wed, Jul 11, 2018 at 6:33 PM, Isiah Meadows <isiahmeadows at>
> So I agree this is a Really Bad Idea™, for this above if not the Kotlin
> reference.

I strongly disagree it's a Really Bad Idea™. I think it's a Moderately Good
Idea On The Whole™. And `!in` is fine by me but I'm also happy with `notin`
or whatever.

I just don't expect it to happen. Too much inertia to add it
after-the-fact, and too many bigger fish to fry. :-)

-- T.J. Crowder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list