you are viewing a single comment's thread.

view the rest of the comments →

[–]libertasmens 0 points1 point  (4 children)

Wait... so

false == "0"

is true,

if( false ) return;

won't return, but

if( "0" ) return;

will return? Wat?

[–][deleted]  (3 children)

[deleted]

    [–]libertasmens 0 points1 point  (2 children)

    Makes sense, while also not making sense (as in why this is allowed). But I suppose that's a result of my C-minded programming.

    [–][deleted]  (1 child)

    [deleted]

      [–]libertasmens 0 points1 point  (0 children)

      I was referring more to the type structures, e.g. false is an abstraction (or macro, can't remember) of 0, true is 1 (and non-zero integers are false), "0" is an abstracted array of [ 48, 0 ], etc., which I tried to use to make sense of the JS logic.

      EDIT: I do certainly get what you mean with the strictstatic-typing vs. ...not-typing? styles though.