Re: Language spec
| From: | Sterling Hughes | Date: | Fri, 17 Nov 2000 16:59:10 +0000 |
| Subject: | Re: Language spec | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-38440@lists.php.net to get a copy of this message | ||
At 05:50 PM 11/17/2000 +0100, Sascha Schumann wrote:
Makes sense to me, a language spec seems like a good idea. -SterlingI think it would be a good thing to start writing a language spec. I'm not quite if there's a standard format but it would be nice to start working on it. It will allow us to review all of the language aspects and only include things which were really meant to be. Do you think we can pull it off in a reasonable manner?This specific problem shows that we need to do something about it. We are currently in a state where the implementation equals the language definition. The incompatibility list (PHP 3->4) would not have been necessary, if we had a formal language definition.Once we have such a language definition, people can still use side-effects of a scripting engine, but they won't be able to claim that those side-effects are valid. And thus, other language implementations would not have to simulate those side-effects.Yes, I think so. While the language itself is not very complex, a commonly agreed-on language specification would prove very useful to the community and the continuity of PHP.I haven't been involved with designing a language specification before, so feel free to comment on this approach.Task 1: Defining the syntax of the languageThe syntax can be represented in the usual pseudo grammar style, which has been used by K&R and many ANSI/ISO language standards before.Task 2: Defining the semantics of the languageThis step basically comes down to defining what meaning the various pieces of the syntax have. I.e. the concept of a function, variable scopes, overloading, et cetera.Does it make sense to set up a separate workgroup for defining (a) the procedure and (b) the language spec itself?