Hi,
“The whole point of CoffeeScript is to remove the noise out of JavaScript and provide
with a compact and pleasing syntax”
“CoffeeScript is a little language that compiles into
JavaScript. Underneath all of those embarrassing
braces and semicolons, JavaScript has always had a gorgeous object model at
its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in
a simple way.”
Thanks to Douglas Crockford of Yhaoo, one of the saints in
the world of computer initiated a movement to popularize JavaScript and showing
its true power and capability to the new generation of developers. And as we
can see, that movement along with the efforts of other ignites a lot of mind
blowing ideas including commonJs and its implementations (nodejs, jsdom to name
a few)
JavaScript is said to be the most misunderstood language in
the world. A huge number of developers started using JavaScript without
learning it before and thought this is toy language of some sort. But it is not
the case for sure.
CoffeeScript is an abstraction over JavaScript. As we know
abstractions are leaky and if that does not provide considerable value, we
should not use it.
Think about all the developers in the world using CoffeeScript
rather JavaScript. Now it will be very difficult for them to learn JavaScript
which is the heart of nodejs along with other great things based on JavaScript.
By the way, what about the debugging options for CoffeeScript.
As CoffeeScript compiles into JavaScript, developers ultimately has to deal
with all those “embarrassing braces and
semicolons” that comes with JavaScript in the end when debugging. So a developer
(think about an entry level dev) ends up learning two completely different languages
for the same purpose. Now, if he learns CoffeeScript first and tries to learn JavaScript
then, he will soon be a lost little dear in the wide meadow of JavaScript. To
add more difficulties, think about the all the experience he had by using
static language and of course CoffeeScript and will hope JavaScript will behave
the same!
The whole point of using CoffeeScript is because JavaScript
is complex/embarrassing to write and read. At one point or another, if you end
up writing or reading JavaScript then does it worth giving CoffeeScript a try?
Think about all these static languages we use every day (C++,
C#, …), semicolons and braces are everywhere. Do those languages embarrass us?
Then, what makes JavaScript the culprit?
JavaScript is different language, it is a little but equally
powerful or in some cases more powerful than all those static languages.
Function is in the heart of this language and this (function) is so powerful
that you can even use it for namespacing your code.
We should treat JavaScript differently as we treat other
languages and give it enough respect as we give other. It is far better
language to call its usages embarrassing. Embarrassing is a storng word to use
in this case. Now, if somebody calls those braces and semicolons embarrassing
just because he did create a new language, make me not to like it in the first
place.
I would not mind if CoffeeScript came to replace VbScript in
the browser environment. JavaScript should not be replaced with anything in any
environment at least now until we have something far better than JavaScript. CoffeeScript
in not certainly a better language than JavaScript.
Would there be any nodeJs if we all would have been using CoffeeScript?
In the beginning good books or learning materials for JavaScript
was scarce. Developers ended up writing JavaScript in a way that they should
not that is without using proper scoping, semicolons etc. JavaScript was so tolerant
in the past that it still tries to make sense out of code where programmer
forgot to use the semicolon at the end of the statement.
As JavaScript standard (EcmaScript, Most recent ES5) got
improved and JavaScript compilers (V8, SunSpider, Chakra) are now more and more
supporting standard, it became harder to write the code the way we used to in
the past which is considered to be bad practice for writhing JavaScript code.
Now all of a sudden CoffeeScript is offering this to us. My problem is not what
it compiles into rather how we write it or we are forced to write it. Note
that, I know it compiles into javaScript
and all are jsLint Complaint good healthy code after that.]
Why would we depend on CoffeeScript to write better JavaScript
code for us?
Thanks for the link of the book. I will read it to know more
about CoffeeScript certainly.