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

I'd like a spec language which takes constraints and compiles code them into target language. This way, we can design features at a higher level and don't have to get lost in forests of ifs, tree searches, caching mechanisms and multi layer state machines.


One clever hack I've seen is Yield Prolog (https://yieldprolog.sourceforge.net/) which basically translates the querying/backtracking execution model into mainstream language syntax - such as JS, Python or C# - using the `yield` keyword and loops. Supports things like variable unification, too.


Having a compiler that supports multiple full languages with required consistent ABI at those boundaries is something we really could use. Then you could have a prolog layer for things where it makes sense mixed with an Algol or ML or whatever based language for the rest of the logic. Similar to what .NET has done-ish, but wider ranging is what I'd love to see.




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

Search: