JavaScript Vs. CoffeeScript : Which one would you prefer?

Kaustubh Katdare

Kaustubh Katdare

@thebigk Oct 26, 2024
I'm sure you might have heard about CoffeeScript. As the official description of coffeescript goes, it's a tiny language that compiles into Javascript. This new language aims to expose and utilise JSs' object model. If anyone's interested in knowing more about it, head over to: <a href="https://coffeescript.org/" target="_blank" rel="noopener noreferrer">CoffeeScript</a> .

Now, I'm not a JavaScript coder but I'm interested in knowing who among you is adopting the Coffeescript over Javascript. What generates my interest in CS? Well, the Dropbox engineering team rewrote the entire browser side codebase from JavaScript to Coffeescript within a week.

Share your reasons for adopting / not-adopting the coffeescript.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Prasad Ajinkya

    Prasad Ajinkya

    @prasad-aSUfhP Sep 14, 2012

    If I had a custom JS codebase, I might think about migrating to CS (provided the compiled JS output is auto-minified and produces the best code for that purpose).

    However, since most of us are using third party scripts almost all the time, why would I take the trouble to learn one more language (which is more confounding than Javascript)?

    Lastly, most of us use JS for simple things really. Our aim is not to write an uber function ... its almost always to do with some sort of validation or form submissions!! So why look at a language which makes JS OOP-based?
  • Harish Kotra

    Harish Kotra

    @harish-OUjQxA Sep 16, 2012

    JS will always be my choice and I totally agree with kidakaka. He told whatever I wanted to 😛
  • Kaustubh Katdare

    Kaustubh Katdare

    @thebigk Sep 16, 2012

    kidakaka
    If I had a custom JS codebase, I might think about migrating to CS (provided the compiled JS output is auto-minified and produces the best code for that purpose).

    However, since most of us are using third party scripts almost all the time, why would I take the trouble to learn one more language (which is more confounding than Javascript)?

    Lastly, most of us use JS for simple things really. Our aim is not to write an uber function ... its almost always to do with some sort of validation or form submissions!! So why look at a language which makes JS OOP-based?
    That makes sense. I wonder why did the Dropbox team took out a week to rewrite their entire browser-side codebase to Coffeescript? Does it offer any advantages / performance improvements in the longer run? Curious to know.
  • Harish Kotra

    Harish Kotra

    @harish-OUjQxA Sep 16, 2012

    Thanks to The_Big_K for making this thread I came across something new to learn at least. Found this interesting post by a guy where he does a postmortem of CS vs JS 😀

    #-Link-Snipped-#
  • durga ch

    durga ch

    @durga-TpX3gO Sep 16, 2012

    The_Big_K
    That makes sense. I wonder why did the Dropbox team took out a week to rewrite their entire browser-side codebase to Coffeescript? Does it offer any advantages / performance improvements in the longer run? Curious to know.
    I think the syntax is similar to python (or ruby). Afaik, Dropbox uses Python. It might make the source more maintainable for them.
  • durga ch

    durga ch

    @durga-TpX3gO Sep 16, 2012

    ok, why would you want to convert to coffee script? I mean when it is based on java?? (is what i am thinking) , why not just use java?
  • Kaustubh Katdare

    Kaustubh Katdare

    @thebigk Sep 16, 2012

    durga
    ok, why would you want to convert to coffee script? I mean when it is based on java?? (is what i am thinking) , why not just use java?
    Java is different from JavaScript, right? In fact Coffeescript has been written in coffeescript! 😉 . Coffeescript is all browser side code (Javascript) while Python is for the servers. Of course choice of Python is a great given the speed at which it runs. I wished I had spent some time learning Python coding.
  • ankur8819

    ankur8819

    @ankur8819-Y8pKwX Sep 17, 2012

    Well i prefer JavaScript any day..Any YUI developers in here..Asking out of curiosity.Initially I had a lot of trouble switching from Javascript/Jquery to YUI but i feel its very powerful..Object based implementation of client side code is done in YUI..