Skip to content

Comment on Writing a C Compiler (2017)parent

Comments

Weren't a lot of functional languages, like ML and it's descendants, created specifically to write parsers and compilers?

No. ML was the meta language for a theorem prover (LCF).

https://en.wikipedia.org/wiki/Logic_for_Computable_Functions

I've seen it claimed that ML was originally written, in lisp, in order to have a better language to write compilers in.

ML was written as the language used by the theorem prover LCF. It was written in Lisp.

I didn't know that link, searches seem to confirm. Thank you.

The LCF style provers rely on the host language type system. A theorem instance can only be created by the trusted kernel. Lisp doesn't obviously lend itself to that - you could represent the proof, but I'm not clear how you'd prevent forging one.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.