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

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.



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.


You partly answered your own question by mentioning "implementation". Specification and implementation are two different things, and both are important.

A specification describes the externally observable behavior, constraints, and properties of a system. That's independent of how those properties are implemented.

An implementation is a concrete realization of a specification, that achieves the specified behavior using particular algorithms, data structures, and operational mechanisms.

> 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.

That's a non sequitur, i.e. the part of your sentence after the commas doesn't follow from the first part.

"Pure specification itself" has a purpose, which is to guide implementations. That's the "practical sense".




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: