Re:The Birth and Death of JavaScript [video]
by calibwam on Friday April 18, 2014 @06:51AM
(#7608714)
It is wrong because it is the toString of Object, because the + operator wants to do string concatenation. You were misleading the audience, both by using a shell which doesn't show strings with quotes, and saying that the toString of the object is 'just an object'.
And that is not the only thing that is misleading, as you clealy said that {} was an object. Yes, the syntax in js is weird as it looks like an object, but it isn't. Again, a better shell would not let you do this.
Re:The Birth and Death of JavaScript [video]
by nilliams on Friday April 18, 2014 @07:53AM
(#7608838)
As gary explained he wasn't wrong in his response to the question because the audience member was asking whether [object Object] means the object is in an array. It doesn't. The string point is moot.
I do agree the {} + [] example has always felt a bit unfair to me (for the reason that {} is a block), but whatever, it's a light-hearted talk.
Re:The Birth and Death of JavaScript [video]
by saraid216 on Thursday April 17, 2014 @10:38PM
(#7607702)
Maybe worth releasing a transcript, at this point?
It's only 15 commas man, 15 commas. That extra comma could kill someone.
Speaking of which, why does WAT do different things on node.js?
Re:The Birth and Death of JavaScript [video]
by Turing_Machine on Friday April 18, 2014 @01:45AM
(#7608087)
"That extra comma could kill someone."
Only in old versions of Internet Explorer.
I've probably seen twenty people call this "wrong", which frustrates me. It's not wrong. It was a stringified object! I didn't say "stringified" because it wasn't relevant to the question of whether the object was in an array!
There are other things in Wat that are genuinely wrong, though, like the fencepost error about "16 commas", which mistake will haunt me forever.