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

I wrote a 'language' that essentially compiled down to several other languages (C++, PHP, Javascript were mostly implemented) but unlike e.g. Haxe, it didn't try to hide any of the underlying languages; instead, for parts that weren't abstracted by the language, you had to provide your own implementation blocks for each specific language. This basically made a file that was meant to be used from e.g. C++ and PHP a mix of three languages: the two you wanted to support plus my custom language.

It was mostly useful for writing boilerplate code only once; stuff like class declarations that had to change in sync between parts of one code base. But it grew from there to the point where it let you express 'pure' algorithms in this language so that you only had to write them once, but if you wanted to you could 'override' parts of it in the target languages. It was the bastard child of a compiler and a macro processor. It saved me many, many hours writing tedious boilerplate; however I don't think it saved me more than I spend on it.

It has to be in one of my zipped up archived subversion repos somewhere...



Sounds similar to MyDef: https://github.com/hzhou/MyDef. However, MyDef doesn't attempt to be a new language, it attempts to be meta-layer. With MyDef you can save time with boilerplate, and more importantly, reorganize code into a better semantical structure.




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

Search: