toolness / p5.js-widget

A reusable widget for embedding editable p5 sketches in web pages.
https://toolness.github.io/p5.js-widget/
GNU Lesser General Public License v2.1
161 stars 44 forks source link

Consider adding optional support for CoffeeScript #25

Open toolness opened 8 years ago

toolness commented 8 years ago

I'm not really sure what the future of CoffeeScript is given the advent of ES6/ES2015, but given some of the findings of evidence-oriented programming, I wouldn't be surprised if it's significantly easier to learn than JS.

Might be worth investigating if there's a way to dynamically transpile coffeescript into JS in a way that preserves line numbers, and then offering optional support for it, or something.

toolness commented 8 years ago

I did a bit of research and I think the only difficulty in doing this is mapping errors back to the correct source line. Because browsers don't perform source mapping in exception stack traces, the line numbers we show users for errors would be off, so we'd have to use a tool like stacktrace.js to map back to the correct line number.