ID:2478664
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
A nin operator short for not in.

Instead of:

if(!(I in L))


You could do:

if(I nin L)



Why this is good:

It would (theoretically) slightly speed up runtime, because it doesn't have to do an extra not operation.

I think it might also speed up compile time a bit because instead of looking at 4 operators, it's looking at one, and it doesn't have to worry about the parentheses either when processing the order of operations. It's a small amount of time of course but !(I in L) appears a lot of times in many codebases.
I believe Kaiochao requested something like a
!in
operator before.
+1
if(a !in b)