4 ms·
JavaScript was rushed to the market in a few weeks so it is also a fractal of bad parts, for example, the == operator sucks just like in PHP, the + operator is
by jhuni 15y ago
JavaScript was rushed to the market in a few weeks so it is also a fractal of bad parts, for example, the == operator sucks just like in PHP, the + operator is used for both addition and concatenation, semicolon insertion has an unintuitive behaviour, etc. See JavaScript the bad parts for more detail. The entire web is built on a terrible foundation with languages like JavaScript and PHP that it is a wonder how it got to be as advanced as it is today.
- TazeTSchnitzel 15y agoJavaScript has its bad parts, but it's nowhere near as bad as PHP in its bad parts. JavaScript has some really good ideas in it as well. Plus, it's actually quite easy to code in JavaScript avoiding the bad parts.
- jhuni 15y ago>JavaScript has its bad parts, but it's nowhere near as bad as PHP in its bad parts. I am not familiar with any precise quantification of the bad parts of JavaScript and PHP which could serve as a basis of that conclusion. That said, both PHP and JavaScript are web scripting languages that are full of bad parts. Extrapolating outwards, the entirety of modern web development is flawed. > Plus, it's actually quite easy to code in JavaScript avoiding the bad parts. In a sense it is harder to avoid the bad parts of JavaScript because it is tied to the browser platform, with PHP you can avoid basically all of its bad parts by simply using a different language like Clojure or Scheme.
- sedev 15y agoThis is also part of the problem. Go read Crockford's "Javascript: The Good Parts". Then notice that this article demonstrates why there is not, and probably never will be, "PHP: The Good Parts."