
Simon Buchan wrote:
Jonathan Turkanis wrote:
Note that I'm not criticising the standard (although it certainly has some problems with lack of precision). It would be nice to have a truly formal specification, but in the case of C++ it's probably not realistic.
I do think it's possible
I said 'realistic'
(If it wasn't, we wouldn't be able to write compilers for it!),
That's like saying: Of course it must be possible to provide a formal semantics for English -- otherwise I'd never be able to understand the instructiosn that come with my coffee maker :-)
but remember the standard has basicly grown out of rewordings from the days of C (which did likewise back to B, etc...) I think a formal, but human-readable, grammar, kind of like EBNF for semantics, would be useful here.
It would be very useful (except I'm not sure what you mean by "kind of like EBNF for semantics") -- Jonathan Turkanis www.kangaroologic.com