|
|
Chambers wrote:
> However, I really have to question the validity of your grief... after
> all, explicitly linking against an out of date binary is bound to cause
> trouble for you no matter what.
Well, yes. That's why Ada, for example, mandates that the compiler check
for that sort of thing.
The original question was "what's the benefit of not having separate
headers". That's one of the benefits - you don't even have to check if
the binary is out of date. Unless you have object code for headers,
there's no good way of checking whether the header has been changed
since the body has been changed, or whether the version of the header
you're using matches the version of the body.
Does C++ still choke if one source file has "extern int X;" and the
other has "float X;" as globals? Certainly C has no concept of "this is
a header" at compile time. Some compilers might try to make up for that
fact, but it's not part of the language.
If your compiler takes type declarations out of the object files instead
of the source code for types that you aren't actively compiling, I can't
see any good reason to manually maintain two versions of the declarations.
Eiffel's IDE even has functions to make "short" and "flat" and
"short/flat" declarations from the code. ("Short" being just the
signatures, and "flat" being code as if no inheritance was involved.)
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
|