Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Too late to edit: I just found ki (http://ki-lang.org/) which is a Lisp implemented as a set of macros on top of Sweet.js, which means you can a) freely mix it with JS; b) compose it easily with other Sweet.js macros. Now this is huge: all those compile-to-JS languages are nice, but they don't compose at all, ie. if you write Coffee and decide that there's a neat Sweet.js macro you'd like to use you're out of luck. You can't import just one operator (for example `|>`) from LiveScript to Coffee, you need to change the whole language. While this is not a big problem for me personally, it's still an unnecessary overhead.

Sweet.js, which is modeled after Racket parse transforms, allows for importing only those syntactic extensions you're interested in and most of those macros will probably compose nicely. I always supported the idea of Sweet.js, but I didn't use it because its library of available macros was too small (I'd need to reimplement too much of LiveScript) and macros in syntaxes as complicated as JS are a huge pain to properly display in editors. ki would probably solve the latter problem for me - with syntax that regular adding support for it to js-mode in Emacs shouldn't be too hard. This could mean that it's time to try Sweet.js for real!



I'd like to know how you find it, if you do this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: