Page 1 of 1

Coffeescript

Posted: Wed Apr 04, 2012 8:55 am
by DaddyHoggy
I thought this might be of interest to would be OXP writers who are struggling with Javascript: http://coffeescript.org/

Re: Coffeescript

Posted: Wed Apr 04, 2012 12:19 pm
by Kaks
By giving them a different language to figure out?? :shock:

Oh well, it takes all sorts I suppose... If anyone actually uses coffeescript for their oxp, it'd be interesting to know I suppose... though creating 'compiled coffeescript' sure looks like a complicated way of writing javascript code... :P

Re: Coffeescript

Posted: Wed Apr 04, 2012 1:11 pm
by DaddyHoggy
I know where you're coming from Kaks, but some people might like to try coffeescript as an alternative but should still end up with valid javascript at the end.

Re: Coffeescript

Posted: Wed Apr 04, 2012 5:42 pm
by Kaks
Well, the syntax doesn't resemble many programming languages I'm familiar with, but as long as it helps people, I'm all for it! :)

Re: Coffeescript

Posted: Wed Apr 04, 2012 6:18 pm
by Gimbal Locke
Kaks wrote:
Well, the syntax doesn't resemble many programming languages I'm familiar with, but as long as it helps people, I'm all for it! :)
It looks a bit like Prolog and Erlang syntax (which I personally prefer over C-style syntax).

Re: Coffeescript

Posted: Fri Jun 29, 2012 8:40 pm
by Gimbal Locke
Two links which may be interesting:

* List of languages that compile to JS, I was surprised on how long the list is. (But since JavaScript seems to be becoming the standard client language Everywhere pretty fast, this might have been to be expected??)

* JavaScript: The World's Most Misunderstood Programming Language argues that JavaScript is "Lisp in C's Clothing" (meaning: a functional language with curly braces syntax, with arrays in stead of lists & objects in stead of property lists).

Edit: corrected the link - thanks Ahruman for pointing this out! :oops:

Re: Coffeescript

Posted: Fri Jun 29, 2012 9:42 pm
by JensAyton
Gimbal Locke wrote:
List of languages that compile to JS, I was surprised on how long the list is. (But since JavaScript seems to be becoming the standard client language Everywhere pretty fast, this might have been to be expected??)
Correct link

Yep. This is also known as the “assembly language for the web” meme; if you want your language/runtime environment to run on the web, and you aren’t Adobe, compiling to JavaScript is the way to do it. And now, even if you are Adobe, since Flash is in the process of transitioning to a JS authoring tool.

There are some pretty impressive things out there, like a C++ and OpenGL game engine compiled to JavaScript and WebGL with only minor modifications.

One of the goals of the upcoming ES6/harmony specification is to make it a better target for this sort of thing, most notably by adding a lower-level memory model. The competition for JS performance is still very hot, and even Internet Explorer has been playing a strong game recently.