It's snowing, and I'm on my nth cup of coffee, and I'm going to talk a little bit about Coffee Script. Full disclosure: I found out about this from a post someone made a while ago over on Forrst but that's not the right place for a rambling blog post.
I've been meaning to try CoffeeScript out for a while now, and since I've started a new, mostly-straight-html website for a client I figured it was a good chance to leap in. I haven't got very far yet, but I'm hopeful. A potentially interesting thread just started up asking Do We Need More Programming Languages? but it hasn't got a lot of momentum yet.
CoffeeScript is a new language, of sorts, and then again it's an old language. It interests me. And nobody else is talking about it here. It's a syntactic re-write of javascript. Confused? No need, just read the blurb. In short, it takes a syntax more similar to Python than much else, and compiles it to javascript. So it'll work in any browser, just like JS. It'll work with frameworks, like jQuery. It'll work with anything that uses javascript - you just have to remember to compile it and not let your cow-orkers make changes to the JS files when you're on holiday.
Because it compiles to JS, it doesn't have the problem of needing popular support. You don't have to use it. If it disappears from view, in five years someone can simply delete it, look instead at the JS it produces and work from that.
Syntax-wise, well, I love me a bit of Python these days. I like the way CS takes the best of that awesome language and the best of JS. Example code looks extremely clean and readable. Obviously, that's cherry-picked for the website, but the potential is there.
I'm saying all this, but I haven't compiled anything yet. I'm just psyched by the idea. If it plays out, I might even do some sort of tutorial. If not... I'll deny everything.
I've been meaning to try CoffeeScript out for a while now, and since I've started a new, mostly-straight-html website for a client I figured it was a good chance to leap in. I haven't got very far yet, but I'm hopeful. A potentially interesting thread just started up asking Do We Need More Programming Languages? but it hasn't got a lot of momentum yet.
CoffeeScript is a new language, of sorts, and then again it's an old language. It interests me. And nobody else is talking about it here. It's a syntactic re-write of javascript. Confused? No need, just read the blurb. In short, it takes a syntax more similar to Python than much else, and compiles it to javascript. So it'll work in any browser, just like JS. It'll work with frameworks, like jQuery. It'll work with anything that uses javascript - you just have to remember to compile it and not let your cow-orkers make changes to the JS files when you're on holiday.
Because it compiles to JS, it doesn't have the problem of needing popular support. You don't have to use it. If it disappears from view, in five years someone can simply delete it, look instead at the JS it produces and work from that.
Syntax-wise, well, I love me a bit of Python these days. I like the way CS takes the best of that awesome language and the best of JS. Example code looks extremely clean and readable. Obviously, that's cherry-picked for the website, but the potential is there.
I'm saying all this, but I haven't compiled anything yet. I'm just psyched by the idea. If it plays out, I might even do some sort of tutorial. If not... I'll deny everything.
7 Comments On This Entry
Page 1 of 1
Amrykid
30 November 2010 - 06:24 AM
After taking a quick look at the syntax, it looks fun. Good Luck learning it and I hope to see some tutorials.
heyoman1
30 November 2010 - 08:09 PM
CoffeeScript was made with that "make your own programming language" pdf thing. Just a tid-bit of info.
NickDMax
01 December 2010 - 03:04 PM
Well my immediate question is: What does jQuery look like in CoffeeScript? It is obviously possible but is it functional from a syntax prospective.
the one thing I really don't like about jQuery is the appreance of the word "function" and brace-parenthesis-semicolon nests (I noticed that many jQuery developers leave off unneeded semicolons but that drives me nuts).
So if I can find ways to simplify having to write:
. o O (There is probably an easier way to express the above line of code I just needed an example of jQuery syntax.)
the one thing I really don't like about jQuery is the appreance of the word "function" and brace-parenthesis-semicolon nests (I noticed that many jQuery developers leave off unneeded semicolons but that drives me nuts).
So if I can find ways to simplify having to write:
$('td:odd').each(function() { console.log($(this).text()); });
I am all for it. I love jQuery selectors but the overall javascript syntax begins to get on my nerves. . o O (There is probably an easier way to express the above line of code I just needed an example of jQuery syntax.)
Page 1 of 1
Tags
My Blog Links
Recent Entries
-
It's good to re-implement sites. Say it with me, "this time, I'll do it right"
on Dec 23 2010 03:39 AM
-
CoffeeScripton Nov 30 2010 06:02 AM
-
-
-
Recent Comments
-
Munawwar
on Dec 23 2010 05:31 AM
It's good to re-implement sites. Say it with me, "this time, I'll do it right"
-
-
-
-
Search My Blog
1 user(s) viewing
1 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)
|
|



7 Comments








|