CoffeeScript: The beautiful way to write JavaScript
1–10 of 88 posts
Re: CoffeeScript: The beautiful way to write JavaScript
#2Re: CoffeeScript: The beautiful way to write JavaScript
#3I was writing a web server that just wouldn't compile, looked the code over several times and eventually gave up and did it in javascript instead. Later found out that Gedit was displaying a tab that vim showed as just being a space. Never tested if that was the only problem or not.
Re: CoffeeScript: The beautiful way to write JavaScript
#4I understand that syntax may be more convenient for some, but this is indirection, and is a source of complexity that may impede collaboration from other devs more familiar with JavaScript.
Re: CoffeeScript: The beautiful way to write JavaScript
#5I can't shake the feeling that people that like CoffeeScript are those that don't "get" JavaScript (e.g. CoffeeScript's notion of a class, whereas JavaScript has none -- let go an embrace the prototypal object model). Further, most (if not all) of the examples of the problems with JavaScript are null and void. A language that combines paradigms? Most do. Sure, the name sucks, but that's hardly an issue. I understand…
Re: CoffeeScript: The beautiful way to write JavaScript
#6I've had trouble learning CoffeeScript due to the compiler not providing any help whatsoever when you make a mistake. I was writing a web server that just wouldn't compile, looked the code over several times and eventually gave up and did it in javascript instead. Later found out that Gedit was displaying a tab that vim showed as just being a space. Never tested if that was the only problem or not.
Re: CoffeeScript: The beautiful way to write JavaScript
#7Re: CoffeeScript: The beautiful way to write JavaScript
#8I can't shake the feeling that people that like CoffeeScript are those that don't "get" JavaScript (e.g. CoffeeScript's notion of a class, whereas JavaScript has none -- let go an embrace the prototypal object model). Further, most (if not all) of the examples of the problems with JavaScript are null and void. A language that combines paradigms? Most do. Sure, the name sucks, but that's hardly an issue. I understand…
Every single time you see JavaScript prototypes used effectively, you'll find that they follow a classical pattern: A constructor function serves as the class object from which new objects are instantiated. Syntax like instanceof ("object instanceof class") gives this away. So do all of the built-in JavaScript classes: String, Function, RegExp, Number...
If it's an abstract object that defines common properties for instances, it's a class object, regardless of what you choose to call it. JS prototypes just expose the implementation mechanism, and CoffeeScript just provides you with a convenient way to manipulate the prototype chain.
Re: CoffeeScript: The beautiful way to write JavaScript
#9I can't shake the feeling that people that like CoffeeScript are those that don't "get" JavaScript (e.g. CoffeeScript's notion of a class, whereas JavaScript has none -- let go an embrace the prototypal object model). Further, most (if not all) of the examples of the problems with JavaScript are null and void. A language that combines paradigms? Most do. Sure, the name sucks, but that's hardly an issue. I understand…
Add to this the fact that JavaScript's prototype system isn't actually very flexible, and you're almost always better off to roll a class-based system on top of it.
Re: CoffeeScript: The beautiful way to write JavaScript
#10One question I had while reading this. Was there a technical reason why he didn't make a gem or toolkit in pure Ruby or Python that would then spit out Javascript?
I think this is closer to how GWT did it where you can write pure Java, and of course it then wouldn't require people to learn a new language.