rzimmerman / kal

A powerful, easy-to-use, and easy-to-read programming language for the future.
http://rzimmerman.github.io/kal
MIT License
394 stars 18 forks source link

Does `is not` equal to `isnt` #112

Closed bcho closed 11 years ago

bcho commented 11 years ago

The code likes that:

x = 'foo' if y is not null else 'bar'

will generate this js code:

x = (y === !null) ? 'foo' : 'bar';

but actually what I want is:

x = (y !== null) ? 'foo' : 'bar';

And the second generated code is exactlly what isnt generated.

So, does is not not equal to isnt ?

rzimmerman commented 11 years ago

I agree this is confusing. "is not" should be equivalent to "isnt" (I'll work it in). "doesnt exist" works well for null checks at the moment.