D
David R Tribble
Eric said:It seems to me "semantically equivalent" might
open an unpleasant can of worms. For example, are
typedef unsigned int mytype;
typedef size_t mytype;
"semantically equivalent" on an implementation that
uses `typedef unsigned int size_t;'? What's really
wanted is "equivalence of intent," which seems a
harder notion to pin down.
It should mean "semantically equivalent", as in "equivalent types",
to allow C to be compatible with the C++.
If the suggestion were modified to require "lexical
equivalence," such questions would disappear and I don't
think the language would be any the worse without them.
Writing header files would perhaps not be quite as much
easier as with "semantic equivalence," but I think would
be a good deal easier than it is now.
Lexical equivalence is harder for compilers to check than
semantic type equivalence, which is already present in compilers.
-drt