Today's Question:  What does your personal desk look like?        GIVE A SHOUT

JavaScript Is Not A Language

  Giles Bowkett        2011-12-29 08:46:15       4,484        0    



Recently people presented arguments for and against using CoffeeScript. I felt the argument against was pointless and obviously wrong, but I couldn't figure out why, and I thought the counterargument for was kind of toothless and irrelevant. I've figured out the real issue.

The real argument for CoffeeScript is that JavaScript is not really a language.

Years ago I read something which explained, in my opinion, why Lisp has never achieved the mainstream adoption its passionate advocates believe it deserves. Lisp projects experience a degree of balkanization because everything is left wide open; you can use more than one object-oriented paradigm (potentially even at the same time), you write your own this, you write your own that, you write your own everything.

At Canada on Rails in 2006, somebody asked DHH why Rails didn't have a to-do list generator, and he said it was the wrong level of abstraction; to-do lists are always application-specific enough that any generator worth a damn would be as complicated as Rails itself, and probably as many lines of code. It's not something you can solve at that level of generality.

Lisp fails to recognize this, and rather than being a language, it is an abstract syntax tree manipulation system. An abstract syntax tree manipulation system is something every language needs and is built on, but it is not a language, any more than a skeleton is a person. Programmers who say Lisp is better than any other programming language are really saying that they prefer manipulating the abstract syntax tree directly vs. using somebody else's user interface for the same task, which is all a programming language ultimately is.

JavaScript is a Lisp with hideous syntax. Not surprisingly, it sees similar balkanization. Consider writing modular code. Do you use CommonJS, require.js, or something else? The question is idiotic; it should be answered at the language level. Do you choose which modular code-sharing system to support when you sit down to write your module? If you have three different solutions for writing modular code, you can't write modular code.



I use CoffeeScript for the same reason I use Ruby. Manipulating the abstract syntax tree directly is way more fun, but insufficiently pragmatic.

Source : http://gilesbowkett.blogspot.com/2011/12/javascript-is-not-language.html

JAVASCRIPT  MODEL  NOT A LANGUAGE  COFFEESCRIPT 

Share on Facebook  Share on Twitter  Share on Weibo  Share on Reddit 

  RELATED


  0 COMMENT


No comment for this article.