One way of paraphrasing “the complexity of a programming language” is “how difficult is it to learn the language until you are productive”. Obviously, measuring complexity in the above manner is interesting, but not the whole picture: Some concepts are more powerful than others. And sometimes adding a new concept decreases the complexity of a language, without making other concepts completely obsolete. As an example, look at ECMAScript 6 classes [1]. They will simplify inheritance, but you still need basic knowledge of constructors. Furthermore, much complexity is contained in software stacks (runtime library, 3rd party libraries, etc.).
The complexities of JavaScript and CoffeeScript are not too far apart. After all, the latter is based on the former. That made me think: JavaScript plus quirks is less to learn than many other languages that have fewer quirks. Additionally, when learning JavaScript, you can start small and software stacks are usually comparatively lightweight.
Reference:

3 comments:
"JavaScript plus quirks is less to learn than many other languages that have fewer quirks." Hmm, well, yes, but I wonder if it's precisely that ease-of-learning that lets you get away with not understanding the quirks or knowing they exist at all. It's a double-edged sword.
The problem may indeed be that JavaScript minus quirks *seems* easy to learn. You need a good book that includes the quirks with the features.
Learning good style seems harder in flexible languages (JavaScript, Python, Ruby, Common Lisp, etc.) than in more rigid ones (Java).
totally agree, JavaScript is tricky that way ,you can emulate different styles ( classical inheritance, prototypical inheritance functional programing), deep down, JS is really expressive and powerful
Post a Comment