Learn Java Script Training from the Best Tutors
Search in
Because it sucks. JavaScript is a miserable programming language. Anyone who tells you differently or says things like "Oh, it's like lisp, wah wah wah, it's misunderstood wah wah wah." has advanced JavaScript Stockholm syndrome.
First off, JavaScript it not like lisp. Why? I'm glad you asked:
* Lisp syntax consists mostly of polish-prefix S-Expressions, like this: (sqrt (* 2 3)). JavaScript has a C-like language.
* The central data structure of lisp is the list. JavaScript does not have a list type. JavaScript arrays are not lists. The primary data structure of JavaScript is the associative array, often masquerading as some other data type.
* Lisp is homoiconic, its code and its data have the same primary representation. JavaScript is not. Not even a little bit.
* Lisp, due to its homoiconicity, naturally lends itself to robust macro systems. JavaScript does not have macros.
* Having lambdas do not make a language like Lisp. C++ has lambdas. Also, Java has lambdas. Python has lambdas, Haskell has lambdas. Nobody is stupid enough to confuse those languages with a lisp.
Okay, now on to why JavaScript itself sucks.
JavaScript goes to such enormous lengths to avoid crashing that it impedes its usability.
In programming languages that aren't designed by idiots, doing silly things like trying to multiply a string by another string or taking the square root of an array will crash your program. It is a good thing. After your application crashes, you will notice that it hit and fix the bug. Then it will no longer crash. In JavaScript none of these crashes. Instead, they give some result that doesn't make sense, you store this result, and then the program crashes later or doesn't do what you wanted. Now, instead of having hit right where you wrote the bug, it crashed billions of lines of code then, and you need to trace back to the actual virus and fix it. It is an enormous problem, and only gets worse, the more extensive your program is.
JavaScript tries to pretend that it has classes, but it doesn't. JavaScript has a prototype based inheritance system, which is fine, but it isn't honest about it, to the point that most JavaScript programmers don't understand how it works. I've gotten lots of comments from experienced JavaScript developers which revealed gross, pervasive misunderstandings about the language's basic features. It is the cause of many strange bugs, ugly APIs, and bizarre cobbled together simulacrums of other programming languages.
JavaScript has no module system. You can build yourself a module system with closures, but that's just silly. If you ordered a CPU from Intel and Gordon Moore sent you instructions for how to go to the beach, get some sand, put it in a furnace, make the hot sand into silicon wafers, etch some gates into them, and make a microprocessor, you'd laugh in his face. Well, that's what JavaScript is making you do when you're rolling your module system out of closures. Even C-style header files, which operate via literal text inclusion and are widely regarded as the worst thing ever would be an improvement.
I could probably go on and on about other issues, but the three above are enough. They are not stylistic choices about which reasonable people might disagree, but they are flaws. There is no universe in which they are good choices.
And do you know what the sick part of all this is? Do you know what I'm going to do right now? I'm going to write some JavaScript because I want my program to run everywhere, and so I have no choice. But you can be very sure I'm going to be cursing Brandon Eich's stupid, stupid face while I do it.
View 1 more Answers
Related Questions
Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com
Ask a QuestionRecommended Articles
Top 6 Skills Required to Become a Web Designer
Here are the top 6 must have skills for every Web Designer : Technical Skills Web designers undoubtedly require very strong technical skills. They must have hands on using Web designing software and tools, such as Adobe Dreamweaver, Fireworks, Photoshop, Flash etc. In addition to the knowledge of design...
What is Applications Engineering all about?
Applications engineering is a hot trend in the current IT market. An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...
Make a Career as a BPO Professional
Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...
8 Hottest IT Careers of 2014!
Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...
Looking for Java Script Training classes?
Learn from the Best Tutors on UrbanPro
Are you a Tutor or Training Institute?
Join UrbanPro Today to find students near youThe best tutors for Java Script Training Classes are on UrbanPro
The best Tutors for Java Script Training Classes are on UrbanPro