Re:Clinkle gets hacked before it even launches
by 14113 on Thursday January 30, 2014 @07:36PM
(#7154449)
Perhaps some implementation might consider 0 to be a 'NULL' value, assume it's null data and thus ignore it.
[ Parent
| on HN ]
Re:Clinkle gets hacked before it even launches
by X-Istence on Thursday January 30, 2014 @07:52PM
(#7154526)
NULL != 0.
Re:Clinkle gets hacked before it even launches
by thirsteh on Thursday January 30, 2014 @07:57PM
(#7154541)
That never stopped JavaScript, Python and friends from giving them equal truthiness.
Re:Clinkle gets hacked before it even launches
by X-Istence on Thursday January 30, 2014 @08:44PM
(#7154737)
Ehm, Python doesn't have a NULL:
>>> NULL == 0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'NULL' is not defined
Even None, which is as close to NULL you are going to get in Python is not 0. >>> None == 0
False
Re:Clinkle gets hacked before it even launches
by taway2012 on Thursday January 30, 2014 @10:52PM
(#7155136)
This is probably what the parent meant:
>>> 'truthy' if None else 'falsy'
'falsy'
>>> 'truthy' if False else 'falsy'
'falsy'
>>> 'truthy' if 0 else 'falsy'
'falsy'
Re:Clinkle gets hacked before it even launches
by dragonwriter on Thursday January 30, 2014 @08:03PM
(#7154573)
> That never stopped JavaScript, Python and friends from giving them equal truthiness.
Implicit casts -- including to booleans -- are dangerous, but if you try to write APIs to try to avoid every bad thing that might happen with naive use of implicit casting in every language that might be used to consume your API, you won't be able to do anything at all.
Re:Clinkle gets hacked before it even launches
by aj on Thursday January 30, 2014 @10:21PM
(#7155048)
"truthiness" is true/false and NOT NULL!
0 != null
null != false