Taking a quick look at CoffeeScript

I have been sort of skeptical of CoffeeScript based on my limited knowledge of it for a few simple reasons: I don’t particularly care for the indented block style; the “human readable” style, while easy to read, is not as easy to scan; and I don’t feel like I need a layer of abstraction on top of JavaScript.

But there are enough CoffeeScript headlines popping up on HackerNews that it’s clear I needed to read a little bit about it, so that’s what I did today. So first with the bad:

  • Debugging: Tracing errors back from the compiled JavaScript to your CoffeeScript is going to be a pain in the ass until there are add-ons or direct support from the browsers to handle debugging.
  • Var as a reserved word: This seems like a minor issue weighed against the benefits of CoffeeScript handling your var declarations for you, but you can’t shadow outer variables. It would be nice to be able to explicitly gain control of the var keyword.
  • [edit: forgot to add this] Comparison conversion: CoffeeScript automatically makes == become === so coercion comparison just isn’t an option as far as I can tell.

So other than the fact that I prefer all those brackets, braces and semicolons, that’s really the worst of it. And here are some of the things that make me want to give CoffeeScript a try:

  • Default arg values: This simple addition will help clean up my code quite a bit.
  • Using reserved words as properties: JS has too many reserved words, and it would be really nice to be able to use them without having to worry about quoting them.
  • Until and Unless loops: I think these will make code easier to scan and have often found myself wishing I had this option in JS.
  • Chained comparisons: This reads much better and is much more intuitive to write.
  • Classes: Classical inheritance is just messy in JS. CoffeeScript cleans it up nicely.

There’s enough there that I’m going to give it a try to see how I like it. I have a small project I recently started and I’m curious to see how much smaller it will get in CoffeeScript. There’s also the claim of “tends to run as fast or faster than the equivalent handwritten JavaScript,” so I’ll have to check performance before and after as well.

Tags: coffeescript
prostheticknowledge:

Canv.as - Online Image Sharing / Remixing / Abusing Site now open to all
Share pictures (including animated gifs), which then can be remixed by others … for whatever reason.
https://canv.as/

Reblogging this because my remix was used <3

prostheticknowledge:

Canv.as - Online Image Sharing / Remixing / Abusing Site now open to all

Share pictures (including animated gifs), which then can be remixed by others … for whatever reason.

https://canv.as/

Reblogging this because my remix was used <3

Reblogged from prosthetic knowledge
Tags: canvas
Being passionate about something, whether it&#8217;s completely mundane, mainstream, or terribly nerdy, is the mark of an interesting person.

Being passionate about something, whether it’s completely mundane, mainstream, or terribly nerdy, is the mark of an interesting person.

Canvas has a Tumblr share button now! Also this thread is amazing so you should probably check it out.
 

Canvas has a Tumblr share button now! Also this thread is amazing so you should probably check it out.

 

blogwell:

Dave makes the best remixes yaaaall

I like to pretend that I&#8217;m working when I&#8217;m making remixes. 

blogwell:

Dave makes the best remixes yaaaall

I like to pretend that I’m working when I’m making remixes. 

Reblogged from BLOGWELL
[Flash 9 is required to listen to audio.]

yourpalmal:

“Cat Calls” aka my first live recording!

performed at the Bowery Poetry Club, December, 2010

*5 minutes long. Ball probably doesn’t get rolling until almost 2 minutes in. My bad!

Ourpalmal is the best poet we know. This is amazing.

Reblogged from Your Pal Mal
Tags: so good
yourpalmal:

leiaj:

yall should be proud of yourselves/you inadvertently ruined 3fram.es/whoever makes the next one is going to feel like a dick/lol/dying
P.S WHERE ARE THE ALL DENIM ON DENIM COUCH PIX

Probably unsurprisingly, I was already on 3fram.es when they called me and told me to look at the homepage. Have a feeling it’s gonna be the new chat roulette with less dicks.  Which sucks, obviously.

Winning at 3fram.es is my new favorite game.

yourpalmal:

leiaj:

yall should be proud of yourselves/you inadvertently ruined 3fram.es/whoever makes the next one is going to feel like a dick/lol/dying

P.S WHERE ARE THE ALL DENIM ON DENIM COUCH PIX

Probably unsurprisingly, I was already on 3fram.es when they called me and told me to look at the homepage. Have a feeling it’s gonna be the new chat roulette with less dicks.  Which sucks, obviously.

Winning at 3fram.es is my new favorite game.

Reblogged from Peter Berkman