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

Declarative code doesn’t need a runtime if you have a compiler


Even if the language is compiled, you still need a runtime.

GHC compiles to native code, but there's still a runtime for instance to handle the garbage collection, to sort out the lazy evaluation, and to translate the blocking IO API at the haskell end into a non-blocking IO api at the kernel end.

I surely wouldn't want to be debugging my haskell code on a time budget by directly looking at the machine code that is running. I know some people do that and it can be quite illuminating, but the fact that I can debug haskell in its own terms is good.


You're conflating runtime with interpreter. Interpreter translates non-native code to native code, a runtime is what gives you garbage collection, the vm(ex: JVM), std libraries, etc.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: