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

Rookie question, but what does a language specification for PHP do or mean? I assume this is good, but don't know why. :)


The obvious thing it does is lays the groundwork for multiple first-class implementations. As it stands, the program php essentially is the reference: whatever it does, implementation quirks, bugs, and all, is what php should do.


What is a language, really? It's not really an implementation (necessarily); a language can have multiple implementations, in which you have to ask "which one is the language?" if they have subtly different behaviour.

In order to enforce what a language is, you can introduce a specification. This will say that "given a program X, the language will behave like Y". Now any implementation of the language can be checked for conformance.

The spec itself might be some document, or perhaps just a "blessed" implementation ("the implementation is the spec").




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

Search: