Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But on the flip side you can also do "if my_var", which will evaluate to true for any non-nil value and non-false value


Is that a common source of typing errors? Genuinely wondering as I don't have a whole lot of experience with statically typed languages. I've personally never had a bug related to it.

I wasn't meaning to imply everything is perfect, though. For example equality operators take anything. I believe there may be changes coming around there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: