When comparing Ruby (via Opal) vs Cor, the Slant community recommends Ruby (via Opal) for most people. In the question“What are the best languages that compile to JavaScript? ” Ruby (via Opal) is ranked 16th while Cor is ranked 42nd. The most important reason people chose Ruby (via Opal) is:
Ruby has a very clean syntax that makes code easier to both read and write than more traditional Object Oriented languages, such as Java. For beginning programmers, this means the focus is on the meaning of the program, where it should be, rather than trying to figure out the meaning of obscure characters. presidents = ["Ford", "Carter", "Reagan", "Bush1", "Clinton", "Bush2"] for ss in 0...presidents.length print ss, ": ", presidents[presidents.length - ss - 1], "\n"; end
Ranked in these QuestionsQuestion Ranking
Pros
Pro Elegant syntax
Ruby has a very clean syntax that makes code easier to both read and write than more traditional Object Oriented languages, such as Java. For beginning programmers, this means the focus is on the meaning of the program, where it should be, rather than trying to figure out the meaning of obscure characters.
presidents = ["Ford", "Carter", "Reagan", "Bush1", "Clinton", "Bush2"]
for ss in 0...presidents.length
print ss, ": ", presidents[presidents.length - ss - 1], "\n";
end
Pro Popular
Ruby is one of the most popular languages for developing web sites. As a result, there's an abundant amount of documentation, sample code, and libraries available for learning the language and getting your project up and running. The most popular features are just 'gem install' away.
Pro Easy to debug
Cor supports source-maps, allowing you the easy debugging in major browsers. However a line of Cor source is compiled to the exact line number in JavaScript for accurated debugging when developing in platforms that doesn't supports source-maps such as servers.
Pro Clean syntax
Cor enables you to write large applications by providing a clean syntax, classes and a modular architecture to keep organized code, enforcing the writing of readable source code based on conventions.
Pro Cross platform
Cor compiles to plain JavaScript, so, to run it in Node.js or in the browser is piece of cake.
Pro Support coroutines
Cor support coroutines which can be chained, stopped, and synchronized, fitting very well into the web asynchronous world.
Pro Hot reload
Cor provides a smooth front-end development by furnishing a builtin hot-loader which resolves dependences and compiles source code on the fly, with just reloading the Web page. You will only need to use CLI tools to deliver a production-ready version of the app.
Pro Concurrent and parallel
Cor allows to synchronize coroutines by passing messages through channels, and supports the execution of many tasks in parallel, all of that by writing sequential code.
Cons
Con Meta-programming causes confusion for new developers
The ability for libraries to open classes and augment them leads to confusion for new developers since it is not clear who injected the functionality into some standard class.
In other words, if two modules decide to modify the same function on the same class can introduce a number of issues. Mainly, the order in which the modules are included matters. Since you more or less can't tell what kind of "helper" functions a module might write into any class, or for that matter, where the helper function was included from, you may sometimes wonder why class X can do Y sometimes but not at other times.
Con Work in progress
Cor is still a very much young project (as of November 2015) with just one contributor, few stars on GitHub and virtually no learning resources outside the official documentation.