Hello! And we
casually translated the original CoffeeScript documentation into Russian and published it to
cidocs.ru/coffeescriptWhy did it, and a little more interesting about CoffeeScript - under the cut
UPD. It was not easy to settle this post in Habré. The moderator placed it in the hub "I am promoting" in accordance with the rules, due to the fact that the post contains a link to the "personal site"')
I read the wonderful book “CoffeeScript. The second breath of JavaScript ”, I will make a few comments on it.
First, the author does not understand the generators, and my respect for him for what he honestly said "I do not use them, because I do not like them."
From my point of view, the generators are amazing. It's great to be able to replace a piece of code of 10-20 lines with a single line of text in almost human-readable form.
Secondly, there are too few practices in the book.
Thirdly, the existing practices are too much
NODE sideways. With JavaScript, you can write with great success for desktops, Android and iOS. CoffeeScript can be translated directly in the browser, and not only.
So let's go read the original manual. It is very much liked, in my favorite style - Dzenovsky, austere. It is pleasant to read such things, without haste. And my colleague and I decided to translate it in between times (other translations are cidocs.ru).
Error notes can be reported in lichku.
Some more coffee
A. Found such a cool thing -
CoffeeScript-PHP . Do not ask why. But those who come in handy will appreciate it.
B. With the help of an interesting utility
JS2Coffee , CoffeeScript can be distilled in JavaScript and back.
For example, you can do the following:
- Jagged JavaScript code to overtake in CoffeeScript
- The resulting very readable code can be analyzed.
- If you do not want to read CoffeeScript - you can overtake the resulting back in JavaScript, and it will be very nicely decorated - almost without a trace of obsfukatsii
V. For beginners, to understand the basics and to master the power of functional programming, I recommend a wonderful habrapevod.
Functional programming in JavascriptWhy do I like CoffeeScript?
Because it allows you
to translate thoughts into code
much faster , it is possible to use any JavaScript libraries and the resulting JS code is no worse than the quality that you could write with your hands. And it can also be mastered in a couple of hours. And, perhaps most importantly, due to the laconic syntax and exceptional compiler care of the vocabulary, the errors are much less. It is more convenient to focus on
what needs to be done and think less about
how to do it. Great, isn't it?
Example. The project, using underscore.js and jQuery, was written and debugged for 3 days. Having decided to rewrite it in CoffeeScript, we did it in 4 hours, while suddenly there was no need for underscore.js. Naturally, the code has lost five times.
Thank you and good luck to all!