Re: [PHP-LANG] Approaching the First Draft [of a language spec]
[email protected] (Sascha Schumann)
| Newsgroups | php.dev,php.lang |
|---|---|
| Message-ID | <[email protected]> |
> 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.
- Sascha