When comparing KAJS vs Opa, the Slant community recommends Opa for most people. In the question“What are the best languages that compile to JavaScript? ” Opa is ranked 30th while KAJS is ranked 51st. The most important reason people chose Opa is:
Opa uses type inference to decide what code runs on the client or the server, so you can organize code how you like, but still be sure that it runs where it needs to.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Has Ruby-like @ feature
So for example instead if using this.foo
, you can call that variable by using @foo
.
Pro Implicit bracket and variables
No need for var keyword or brackets, just call a function like foo "bar".
Pro Type Inferred
Opa uses type inference to decide what code runs on the client or the server, so you can organize code how you like, but still be sure that it runs where it needs to.
Pro Familiar Javascript Syntax
Opa's syntax is very similar to JavaScript, making it an easy choice for developers who are used to developing in JavaScript.
Pro Client and Server in the same language
Cons
Con No documentation
Con Not popular
Opa is not as popular as other languages which compile to JavaScript. Making it harder to find learning resources or even answers if you get stuck somewhere.