6 ms·
I said "far more sensible", not "unflawed". Please don't misquote me. And, yes, C is a far more sensible programming language than JavaScript is. C may not be
by PommeDeTerre 14y ago
I said "far more sensible", not "unflawed". Please don't misquote me.
And, yes, C is a far more sensible programming language than JavaScript is. C may not be perfectly defined, but at least it isn't full of stupid gotchas like JavaScript is. C doesn't bungle such basic things as equality checks, for instance. C also doesn't include idiocy like semicolon insertion.
C can be risky to use in some cases because it offers an extremely high degree of power and flexibility to the programmer.
JavaScript is risky to use in all cases because it is rife with design mistakes and other inherent flaws that make it much too difficult to write reliable, maintainable code.
- Turing_Machine 14y agoYou were comparing Javascript with the "utter stupidity of its many flaws" to "far more sensible" languages. "C doesn't bungle such basic things as equality checks, for instance." 2.0 == 2? False. Most people would consider that a flaw. As programmers we understand that integers and floats are different in the computer, but that's not how it works in math. "C also doesn't include idiocy like semicolon insertion." You must really hate the languages that don't use semicolons at all. :-)
- eurleif 14y agoHuh? http://codepad.org/aWPtQRMt http://codepad.org/aWPtQRMt
- Turing_Machine 14y ago"==" implies that one can be substituted for the other at will without changing the result. In C, that's not the case for 2 and 2.0. Compilers have gotten a lot better about warning about these situations, but they're far from perfect. In any case, "produces a compiler warning" and "doesn't produce a compiler warning" isn't "==" behavior. We won't even go into why having a logical comparison return an integer result is questionable. Yes, it's very convenient sometimes, but it's still an example of the type of "flaw" that he doesn't like in Javascript.
- deleted 14y ago[deleted]
- Turing_Machine 14y agoHere's an example of it causing problems with no warning of any kind: http://codepad.org/vnYtqRBM http://codepad.org/vnYtqRBM Note that this is precisely why Javascript has ===, widely regarded as one of its "flaws".
- deleted 14y ago[deleted]