Coffeescript

Off topic discussion zone.

Moderators: winston, another_commander, Cody

Post Reply
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Coffeescript

Post by DaddyHoggy »

I thought this might be of interest to would be OXP writers who are struggling with Javascript: http://coffeescript.org/
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: Coffeescript

Post 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
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: Coffeescript

Post 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.
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: Coffeescript

Post 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! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Gimbal Locke
---- E L I T E ----
---- E L I T E ----
Posts: 293
Joined: Sun Jan 08, 2012 11:32 pm
Location: Brussels
Contact:

Re: Coffeescript

Post 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).
User avatar
Gimbal Locke
---- E L I T E ----
---- E L I T E ----
Posts: 293
Joined: Sun Jan 08, 2012 11:32 pm
Location: Brussels
Contact:

Re: Coffeescript

Post 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:
Last edited by Gimbal Locke on Fri Jun 29, 2012 10:39 pm, edited 1 time in total.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Coffeescript

Post 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.
Post Reply