CoffeeScript” a little language that compiles into JavaScript. CoffeeScript is basically just a shorthand form of JavaScript. It’s used by JavaScript developers who enjoy the readability it adds to their code  increasing productivity by writing, and reading, less code in any given program. The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. One can use any existing JavaScript library seamlessly from CoffeeScript and vice-versa. The compiled output is readable and pretty-printed, will work in every JavaScript runtime, and tends to run as fast or faster than the equivalent handwritten JavaScript.

CoffeeScript is a real object oriented language. While one can emulate OO with JavaScript using constructors or the prototype property, CoffeeScript has its own specific syntax to define classes, methods, constructors or instance variables. Real OO eases to build a good architecture and organize your code. Although source CoffeeScript code may look a little different in terms of syntax, it does get transcomplied to full JavaScript  which is when it becomes executable in an environment like a web browser.  Anyhow it is really important to learn JavaScript first, since it will be very difficult to debug the programs without an understanding of the underlying language. With CoffeeScript one will write more compact and readable code, with less punctuation signs and more plain english words. Most of CoffeeScript’s improvements makes one’s code more readable, and more readable code is easier and cheaper to maintain code. This is specially useful when one work on a non-trivial JavaScript project or one need to share code with other people. CoffeeScript provides a lot of simplicity for programmers . The code is simple to read and write. It eliminates all the syntactical hassle of JavaScript and also provide the constructs that are not available in JavaScript. On the other hand it compiles into JavaScript that is works in browsers unambiguously.

Pros & Cons::

 

  • Small, clear language with lots of code examples.
  • Effective when learn the basics.
  • Nice tools provided.
  • Compiled JavaScript runs on server (node.js).
  •  There’s an additional compilation step.
  • One can’t run a debugger on it directly
  • There are fewer resources to learn the language, and fewer people who already know it.
  • The language is changing, while JavaScript remains practically inert.
Share This :

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>