DEV Community

[Comment from a deleted post]
Collapse
 
hasnaindev profile image
Muhammad Hasnain

Babel is what we call a Transpiler. It converts source code into source code. In our case Babel transpiles JavaScript into JavaScript but Babel takes cares of a lot of things. For instance, it makes your JavaScript backward compatible. If you are using arrow functions, Babel will convert it into a normal function.

You can actually go the the Babel's official website and click on "Try it out" in the navigation menu. Play around and you'll get the gist of it.

TypeScript is what we call a superset of JavaScript. It is a language which at the end is compiled to JavaScript with the help of TypeScript compiler. TypeScript is used to add type safety to your code, it prevents lots and lots of errors.

I don't know much about Coffee Script but I think it is the same as TypeScript, at the end it is compiled into normal JavaScript.

Also note that TypeScript does not run natively in the browser or in NodeJS, you have to compile it to normal JavaScript.

Collapse
 
nestedsoftware profile image
Nested Software

I have not used coffeescript much, but it strikes me as mostly javascript with a few nice bits of syntax added to make programming more convenient. I think that some of the things that were introduced in coffeescript were later adopted into javascript in es5/es6. Nowadays, I'm not aware of people using coffeescript much anymore - they'd either use modern javascript (possibly transpiled via babel) or typescript (for the added compile-time type safety).