4 ms·
coffee-script is not less compatible with standard js tools. Again, "it's just javascript" and you can use backticks in coffee to get embedded js. Common mista
by smilekzs 13y ago
coffee-script is not less compatible with standard js tools. Again, "it's just javascript" and you can use backticks in coffee to get embedded js.
Common mistake made by coffee-script-nay-sayers.
- invalidOrTaken 13y agoGive me a break, you know what I mean. When you look at the page source, do you see embedded coffeescript? Can you debug in coffeescript with the standard tools? I know these things aren't possible and shouldn't be expected b/c coffee is a "compiled" language...but you can do them in javascript, and telling the vanilla js programmer that they're "exactly the same" is being less than honest.
- smilekzs 13y agoFor "vanilla js programmer", coffee-to-js-correspondance probably doesn't matter anyway. But the point of coffee is that compiler output is very straightforward. While I have to admit that tooling is far from good enough at present, I personally have no problem reading any js generated by coffee, even without source available to me. Apparently many[citation needed] coffee users can do this. What really made the "vanilla js programmer" feel uncomfortable, I speculate, is the correct way of handling javascript oddities, such as handling nulls (`?` in coffee). They are daunting -- but ignorance is no excuse. Once you start to populate these patterns yourself in your javascript, not only would you immediately recognize them in coffee-generated js, but also you'd appreciate that coffee abstracted them. I think these common points against coffee mostly apply to other compile-to-js languages such as clojure-script, where the generated code almost always made no sense to a "vanilla js programmer".
- iki23 13y agosure, using source maps in chrome dev tools, I can work directly with coffee source, the same way I work with less source instead of compiled css
- iki23 13y agochrome/ff dev tools have source maps support, I can work directly with coffee source the same way, as I work with less source instead of compiled css ... only coffeeconsole is in a separate tab via chrome extension
- elwell 13y agoHe's probably referring to debugging etc.