H
Hendrik Schober
Andre Kaufmann said:[...]
I had a huge problem, with template virtual base classes and somewhere
in the object hierarchy the base function hasn't been overridden and the
compiler logically didn't complain about it. Fortunately I had VC which
has a proprietary extension supporting override for native code too to
ensure that the compiled code does what I expected it to do.
I was only told in the forum that this is a minor problem and therefore
there is no need for override to get into the next standard.
I don't use this coding style anymore [...]
And I think that's the important statement here.
Deep inheritance hierarchies and "pure OO" are,
fortunately, not hip anymore.
[...]Maybe if someone were to come up with a standard for some sort of
meta-code representation then different languages would be able to share
template representations that had been compiled (or part-compiled) down
to that meta-code. The "export" feature in C++ does something along
those lines, but AIUI the intermediate form is still largely C++.
Unfortunately "export" doesn't do what it's meant to be. It doesn't
separate translation units. But yes, I agree that templates could be
supported over language boundaries too.
Google for discussions I had here with Daveed Vandervoorde
and Walter Bright about 'export'. Daveed assured that it
would solve what is my worst problem with templates: That
I not only need to put the template itself in headers, but
also all the templates it depends on. ('namespace detail',
anyone?) That makes for thousands of LoC in headers and,
according to Daveed, 'export' would solve this.
[...]
Andre
Schobi