📜 ⬆️ ⬇️

JavaScript alternatives

image Javascript is almost ubiquitous programming language. In some ways, it can be compared to C at the peak of its popularity. You can write anything on it, ranging from beautiful drop-down menus, sliders on your site, to full-fledged applications for servers, mobile, for desktop and even for embedded systems like arduino .

But javascript has its own tricks. The prototype model of objects, dynamic types, callback functions, all this, one might say, is an amateur. As a result, alternative languages ​​began to appear, offering their own approaches to the implementation of certain concepts. This post lists the most popular alternatives to warm vanilla javascript.


For example, if you want a classic OOP, instead of prototypes, or you want more syntactic sugar, look towards CoffeeScript . If you need strong typing you might like Dart or TypeScript . By the way, Dart works natively in Google Chrome and on some tests it shows a 50% performance increase compared to regular javascript. For lovers of functional programming, ClojureScript or Roy will do. There are lots of options, and you are not required to write everything on pure JavaScript, even if you are developing a front-end under the web or working with node.js.
')

1. CoffeeScript


image
CoffeeScript is a small language that is broadcast in Javascript. It seems to rubists to look like rubies, to pythonists it looks like a python, and of course, it looks like javascript. CoffeeScript tries to simplify the use of javascript, retaining all its strengths.

Official site
Github

2. Dart



Dart is an object-oriented language with a complete class system, lexical scopes, closures, and optionally static typing. Dart helps you create structured web applications and is easy to learn for a wide range of developers.

Official site
On Habré

3. TypeScript


image
TypeScript differs from JavaScript by the ability to explicitly define types (static typing), support for using full-fledged classes (as in traditional object-oriented languages), and support for connecting modules.

Official site
On Habré

4. ClojureScript


ClojureScript is an extension of the Clojure language, with the ability to compile to Javascript. Reminds Lisp.

Github

5. Opal


image
Ruby to Javascript compiler.

Official site
Github

6. IcedCoffeeScript


image

IcedCoffeeScript is a CoffeeScript add-on that simplifies control over asynchronous operations. Instead of callbacks, two new operators are introduced: await and defer.

Official site
Github

7. LiveScript


image
Another fork from CoffeeScript. Adds support for a functional programming style, and also introduces minor improvements to the current OOP model.

Official site
Github

8. Kaffeine


image
Extends the javascript syntax without inventing another programming language. The code on Kaffeine line to line corresponds to the compiled javascript code. This feature should significantly simplify debugging of the application.

Official site
Github

8. Roy


image
An experimental programming language that converts code to Javascript. Includes the capabilities of static functional languages.

Official site
Github

And of course, there is another language, the most important in this family. This, of course, is Javascript itself. Like it or not, it will be executed in the browser. However, for use in large projects it is worth looking towards Dart (supported by Google) or TypeScript (supported by Microsoft). CoffeeScript is very popular lately, and using source maps has made it even easier to work with. If you are tired of javascript or want to try something new, you are welcome.

Ps. The review was prepared using the Jster.Net javascript library catalog . Now it already has 981 files for front-end development.

PS / 2 More AltJS Alternatives

Source: https://habr.com/ru/post/163033/


All Articles