Hacker News new | past | comments | ask | show | jobs | submit login

I'm so happy the good bits of CoffeeScript are now part of vanilla JavaScript and we no longer need compilers for frontend work.

Oh wait ...




We never did and CoffeeScript had no good parts.


Destructuring assignment, arrow functions, shorthand variable syntax in object literals are some examples of good Coffee Script features that made it into ES6


To approach it from a slightly less tongue-in-cheek angle, my main point was that pre-compilation was never strictly necessary. I'm currently using Typescript as it seems to add significant enough value for me to warrant the extra complexity of pre-compilation, but I do think that's quite a big ask. Coffeescript has always seemed very much about conforming to developer syntax preferences, rather than adding functionally useful features.

ES6 arrow-functions add some behavioral change (this assignment) and make some callback patterns more readable ([].map, etc.) but are definitely overused and making a lot of recent code less readable as a result.

Whether destructuring makes code more or less readable is highly contextual and debatable. It does seem to fall well on the wrong end of the "Enabling" side of the "Software Dev Attitude"[0] to me insofar as it definitely allows developers to create very "clever" code at the cost of readability.

Shorthand is shorthand.

Generally speaking - like pre-compilation - these syntactical sugars may be a net positive for some, but they're far from groundbreaking in terms of adding value.

[0] http://martinfowler.com/bliki/SoftwareDevelopmentAttitude.ht...


Destructuring is nice when used with Promises:

    Promise.all([
      getSettings(),
      getData(),
    ]).then(([settings, data]) => {
      // do whatever
    });


Who is using CoffeeScripts these days apart from github ? I like CoffeeScript but I am sad it did not get the momentum.


Lots of Rails developers. I made a conscious decision to introduce CoffeeScript at me work some years ago, because my experience had been that when back-end programmers dabble in Javascript ("The front-ender is busy, but hey, this seems simple enough. I'll just do it myself"), they make horrible messes because they are unfamiliar with all off vanilla JS's quirks and design mistakes (implicit global, to name one). CoffeeScript protects them from making these kind of mistakes/


I am a backend developer working in Ruby. As a senior programmer I sometimes have to help juniors on the frontend side. When I need to write frontend JS, I still often write Coffeescript, compile it and copy paste the resulting JS as "my code". I haven't had the time to look in ES6 and newer JS technologies, but at least I know that the JS I provide follows most good practices.


I'd like to reply to both of you. I like CoffeeScript mainly because it's so similar to Ruby and convenient to use. I have not thought about using the "raw generated js". How does it work for you ?

What if you would choose to work with something like React or Ember ?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: