|
|
|
|
|
by barskern
2987 days ago
|
|
I'm not really sure I understand what Crayon fixes for Javascript. Based on my understanding from the intermediate tutorial it seems to be mostly identical to Javascript, with a game library built in. Can somebody help me understand what makes this language stand out? |
|
Yes, the syntax very closely resembles JavaScript but there's more traits from static languages such as Java and less malleability than JS. For example libraries and dependencies are resolved at compile time and you can make it print out a tree of dependencies at compile time for use in environments that need to be properly sandboxed. Also, fields must be explicitly declared. This allows a lot more things like simple typos to be caught at compile time. The other thing is that it's export-ready for the platforms it supports. For example, when exporting to iOS, it generates a full XCode project. While this is similar to frameworks or languages like Cordova or Haxe, the thing that is unique to Crayon is the localizability of the language and libraries into non-English languages. This is still in the prototype phase, but currently works for Japanese and Spanish: https://crayonlang.org/gengo