4 ms·
Kinda: http://www.brython.info/index.html http://www.brython.info/index.html
by davidbielen 13y ago
Kinda: http://www.brython.info/index.html http://www.brython.info/index.html
- thatthatis 13y agoYeah, I'm aware of this and emscripten. So far, to me, they don't look viable for DOM manipulation.
- adambard 13y agoConsider coffeescript. It does a good job at removing nuisance quirks from Javascript, and adding some python-esque features (sensible looping constructs, list comprehensions, etc.), while maintaining logical equivalence with the javascript it compiles to. (It also mirrors some of the syntactic features of ruby that make that language so appropriate for producing DSLs, which is a feature or a bug depending on your perspective) You really can think javascript and write coffeescript.
- thatthatis 13y agoYou make a convincing argument.
- adambard 13y agoThanks! If you're looking for ways to ease the burden of compiling it yourself, my favorite tools are django-pipeline (for django) and middleman (for static sites). Both of these let you treat coffeescript files as first-class while you develop.
- spion 13y agoConsider ES6 too. It also does a good job at removing some Javascript quirks and adds sensible looping constructs, list comprehensions, generators and generator comprehensions, proxies, rest/spread arguments (removing the need for the magical `arguments` identifier), classes (just sugar for what we already wire up with prototypical inheritance), modules, fat arrow functions etc. No help on the DSL front though - still stuck with various kinds of brackets and parens. On the other hand, it doesn't do the utterly horrible mistake of conflating variable declaration and variable assignment while forbidding shadowing, resulting with surprise bugs and spooky action at a distance.
- adambard 13y agoI like the way ES6 is going, but Coffeescript has the advantage of maintaining compatibility with old (like, old-old) browsers. I hate having to do it, but you can't just ignore them. Server-side, sure, use the latest build you can get.
- spion 13y agoThere is traceur (https://github.com/google/traceur-compiler https://github.com/google/traceur-compiler) and it can provide most of the features - except proxies.