Hacker News new | past | comments | ask | show | jobs | submit login

Those who don’t learn from history are doomed to repeat it. Any day now, I suspect some fools are going to want to write web apps, but they won’t want to use raw javascript and they’ll create some ridiculous custom language to javascript compiler. I can only hope they have the good sense not to tell anybody about it.



We wrote a custom language, only it's javascript. We built a very simple module/class system that compiles to javascript, in javascript. It consists of functions called 'Module', 'Class', 'Static' and such, that generate javascript code. This has had so much value for us. It allowed us to abstract some patterns into 'compiler extensions' for things like scoping, timeouts and cancellation, etc. And more recently, it allowed us to add typechecking by outputting typescript instead of javascript. I think it was a great idea and would do it again, but it's only been 6 years, so perhaps ask me again in 4 years :)




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

Search: