Re: [PHP-DEV] Re: [PHP-LANG] Approaching the First Draft [of a language spec]
[email protected] (Andi Gutmans)
| Newsgroups | php.dev,php.lang |
|---|---|
| Message-ID | <[email protected]> |
At 01:12 AM 11/21/00 +0100, Sascha Schumann wrote: > > Well, I guess I see that a bit the other way around. I see the goal as a > > document that can make the user community know what the language definition > > is. The kind of document you are talking about, which is similar to say, > > ANSI C/ANSI C++ specs, are specs that are useful for compiler developers. > > > > Today, quite often, people come out with questions of 'what happens in this > > case'. For instance, someone asked me today on IRC whether !$foo checks if > > $foo is false, or if $foo is set. Today, there's no place he can go to and > > find an answer to his question. The way I was imagining the language spec, > > I thought it would address exactly those needs (well, that was just a > > simple example :). > > > > Syntactical rules can be useful to end users, and they're common in > > programming language books. If we add a description of the semantics > > surrounding these rules, we can end up with a document that would be useful > > for the average PHP programmer. > > Well, so we almost agree here. > > Syntactical rules are useless without a context which defines > their exact semantics (see Task 2 of my proposal). That is > the format which is chosen by the C/C++ standards as well as > the Python Reference. > > I disagree though that the immediate result of this process > must be a document which can be understood by your average > IRC user. We have the manual for that. When we discussed it the whole idea (at least as I saw it) was that this would be a useful document to the PHP users. Yes, it will be less formal than the C/C++ standards although I know you like formality. It should have examples (the Java and C++ have) and it should answer PHP programmers' questions concerning language semantics. It is for the user. Andi --- Andi Gutmans <[email protected]> http://www.zend.com/