CoffeeScript is Afrikaans JavaScript
logicalfriday.com
logicalfriday.com
This is somewhat analogous to the stage in learning a spoken language where you're mentally translating (rather than just articulating directly in the target language). Unlike a spoken language however, in haml/coffeescript this phase only needs to last about an hour, instead of months or years.
P.S. I have a pet theory that bi-linguals are more 'intuitively comfortable' with what I call 'transformation' languages like HAML and Coffeescript, probably because they're used to cross-compiling their own speech while learning their second language. Not based on any scientific research but it appears to play out in my current office.
I guess it's always possible I have an innate capacity for languages I've never actually developed, though... :P
And I'm not "intuitively comfortable" at all with CoffeeScript -- it has nice Python-esque features which I love, but its seemingly arbitrary parsing edge cases drive me mad.
But I think that one's comfort with using CoffeeScript depends entirely on their level of comfort and knowledge of Python and JavaScript. I don't feel like linguistic skills have any bearing. But it's an interesting idea!
I must point out that the language itself is not as simple ("kitchen dutch") as the author makes it out to be though, in fact it's in my opinion just as sophisticated as dutch - albeit with slightly simplified grammar and spellings.
KoffieSkrip is nie eintlik 'n Afrikaanse Javaskrip nie.
Afrikaans has a few quirks and oddities that would make it seem strange to English speakers. For example, the Afrikaans sentence above means "CoffeeScript is not actually an Akfrikaans Javascript". But to someone who is unfamiliar with the language, the structure might imply a double-negative ("CoffeeScript is not actually an Akfrikaans Javascript not").
- @ for instance variables
- #{} interpolation
and Python:
- for comprehensions
- significant whitespace
http://weblog.raganwald.com/2007/04/writing-programs-for-peo...
Everyone parrots the line that programs should be written for people to read. I agree, and that's exactly why I use CoffeeScript: All of the devs in our office read and write JavaScript fluently, but code written in CoffeeScript is easier to read than code written in JavaScript.
To be fair, that's a personal preference as well. For e.g. some people prefer reading code with symbols (&&, ||) than English keywords (and, or). Also, I have seen people from a C/C++ or Java background find JS easier to read than CS.
When I first saw them I just asked jashkenas in #coffeescript and then it made sense. Later I came to appreciate them in Python. Coincidentally I learned Ruby-style string interpolation from CoffeeScript before trying Ruby.
It reminds me that Japanese has a very simple grammar regarding verbs.
There are very few, clearly identifiable groups based on suffix (I seem to recall it's three groups ~u, ~iru/~eru and irregulars), they are basically invariable, and have only two tense, past and present (plus each having a negative form). Time is more often than not purely contextual. Going even farther, subjects and objects are often omitted altogether,adding to the context you have to maintain. Also, there are only two irregular verbs (kuru and suru).
It's a bliss when you talk to someone and only a few words can bear a lot of meaning (no S) thanks to the context. At some point it feels like perl :-)
Now you might think that japanese got it right but then you learn to count stuff and holy cow you're in for a brainfuck as numbering things vary depending on what you're counting. Yay. But if it was too easy it wouldn't be so charming :-)
I've been watching the coffeescript bandwagon pick up passengers for a while now, but I simply am not convinced that creating a 'language' to simplify or 'improve' another one is a smart thing to do. Maybe on a team that has all Ruby developers this could fly, but now you make it hard to add pure javascript developers to your team without them first getting caught up on your way of doing things.
And then to make things even more tedious, you make it compile to original javascript, an interpreted language. It just reminds me of how Rails initially tried to bake ajax into its way of doing things initially (and has since stopped ... but now we have to support that mess). If the top devs in our field are using it, then there's got to be some merit to it ... but I gotta say, it really doesn't seem all that clever to me.