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

Any Turing complete language can be used for writing compilers/interpreters, it is just harder in some than other.

Python is actually pretty neat for doing it and you even have tools like PyPy (with RPython) to write a JIT for the language if you wish.



You don't even need a Turing-complete language for writing compilers, see CompCert for example.


I need to dive into it.

Do you mean it because of the formal logic being used?


This is because compilation can be represented as a finite sequence of applying simple rewrite rules. You don't need a true Turing-complete language to do so, because you don't have any indeterminate loops in such process. Any simple total language (like Coq) is more than enough.




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

Search: