logoalt Hacker News

antonvstoday at 6:11 AM1 replyview on HN

Maybe this is your point, but the source code of any non-toy compiler is not a usable specification for the language it compiles.

If you want a specification from source code, you need to reverse engineer it. Although that’s a bit easier now, with LLMs.


Replies

Panzerschrektoday at 7:40 AM

What do you mean "usable specification"? Usable to produce another compiler implementation for the same language? This IS possible (like clang was designed to match GCC behavior).

Pure specification itself is useless without actual implementation (which does the job), so, trying to write such specification (in a natural language) has no practical sense.