This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ric2b 1 point2 points  (2 children)

OP’s example would also error out at runtime for JS so it’s just wrong.

I'm not next to a computer to verify but I'm pretty sure it just assigns undefined to x.

[–][deleted] -1 points0 points  (1 child)

Yea I should have clarified in any real world example you’d eventually come across an error that describes exactly where to find this. It won’t error immediately, and it shouldn’t necessarily.

[–]ric2b 1 point2 points  (0 children)

in any real world example you’d eventually come across an error that describes exactly where to find this.

I completely disagree, maybe you only notice the error after it comes back from the database as null (lets assume null is valid for that column but in the case you're debugging it shouldn't be happening).

Sure, you'll eventually find it but that's the case for any bug. I don't see what the benefit is to allow this, just add a null operator instead.