Waldek Hebisch wrote:
Prof. Abimbola A. Olowofoyeku wrote:
On 18 Jun 2005 at 19:57, Frank Heckenbach wrote:
Waldek Hebisch wrote:
[...]
I think that letting an object inherit from anything should work. In fact, one of my pet ideas is to let Pascal objects inherit from other language objects and vice-versa. AFAICS inheriting from Objective C objects is one of main CW Pascal extensions.
Surely, such code could break some patterns valid in single-model programming, but people who want to stay in a single model may do it, and the others probably will find added complexity worthwile.
Seems reasonable.
Is it possible to achieve inheritance from C++ objects?
I think so. Hard, but should be doable by re-using parts of C++ compiler.
There are nasty semantic problems: -- C++ names are case-sensitive -- C++ methods may be overloaded -- C++ methods may be inline -- templates
Still, there is Objective-C++ compiler which allows mixing Objective C with C++, so the problems are solvable.
It all depends upon what you mean by "mixing". If you mean mixing as in being able to have Objective C objects and C++ objects being defined and used in the same program and source code - yep, you can do that. If mean mixing as in Objective C objects inheriting from C++ objects and vice versa - nope.
Gale Paeper gpaeper@empirenet.com