3 ms·
While I don't disagree about the point regarding the relationship between line count and bug count, I'm very wary of this move because they still haven't solved
by shuzchen 15y ago
While I don't disagree about the point regarding the relationship between line count and bug count, I'm very wary of this move because they still haven't solved the issue on how to debug CoffeeScript with all your error messages being reported back to you in terms of the compiled Javascript.
- azakai 15y agoYes, until there are proper stack traces in CoffeeScript, it's very hard for me to adopt it for anything. A project I work on has a small amount of CoffeeScript, and debugging problems in that component is the hardest part of the whole project.
- nas 15y agoThat's an implementation detail though. Although it's a lot of work to fix, it's not insurmountable. You would need your development browser to support Coffescript natively. It's not really a serious problem if IE7 generates a Javascript back-trace, right? The important thing is if Coffeescript really does significantly reduce line count and by extension bug rates. I'm not sure it does, generally syntactical sugar doesn't have that effect. I hope it does. My life seems nicer when writing Coffeescript vs JS.
- ricardobeat 15y agoYou don't need to support CoffeeScript natively. The answer is simple and is called source mapping: the output code carries comments that map each line to a line in the source file. This will also work for LESS and any other transpilers. Work is underway since August to implement it in WebKit (http://peter.sh/2012/01/css-selector-profiler-source-mapping-and-software-rendering/ http://peter.sh/2012/01/css-selector-profiler-source-mapping...) and Gecko (https://wiki.mozilla.org/DevTools/Features/SourceMap https://wiki.mozilla.org/DevTools/Features/SourceMap - the intern has gone back to school, really?)