News for hackers. Stuff that matters.
Re:Return True to Win by jomamaxx on Friday August 12, 2016 @11:59AM (#12276656)
I wish an empty string was not false.

In 'object' terms, an empty string is still a string! It's something.

I guess if you think about it from a memory perspective, it's 'nothing'.

But since JS is not actually like C, I really wish "" were true.

Re:Return True to Win by nv-vn on Friday August 12, 2016 @02:14PM (#12277624)
"" is actually true in C, but that's also because it represents something in memory. Consider how C encodes strings: an empty string is a _pointer_ to a 0 (or a '\0', if you want to think of it as a char). However, the pointer (being an address) is non-zero (since the address 0 is NULL).
Re:Return True to Win by jomamaxx on Friday August 12, 2016 @03:14PM (#12278050)
touché