In article <1993Jan26.145454.21534@midway.uchicago.edu> dave@alex.uchicago.edu
(Dave Griffith) writes:
> In article <C1G9H4.HsA@unix.portal.com> samantha@shell.portal.com (Samantha Atkins) writes:
> >No object language I am aware of does a message based much less a decent
> >semantic based check. So in what way has safety been assured really?
>
> What I want to see, is a language
> where protocols and implementations are definable independently. Protocols
> may for a heirarchy by subtyping, implementations form a heirarchy by
> inheritance. Inherita
nce can thus be just a form of code-sharing, possibly
> not the only such form in the language.
You're in luck---you've just described Objective-C. It supports Protocols, which provide both compile-time and run-time type-checking, verifying that an object or class implements a designated set of messages. Protocols can incorporate ("inherit") any number of parent Protocols, while the class hierarchy (implementations) does not support multiple inheritance.
Someone wrote to this newsgroup a few weeks ago about a project he was working on to add what he called ``signatures'' (essentially the same thing) to C++. While C++ needs new features like Minneapolis needs cold weather, this seems like a good idea.
(Note: Protocols aren't yet available in the current version of
GNU Objective-C; NeXT's latest changes haven't been folded in yet.)
In article <MUTS.93Jan12100059@PMCS.estec.esa.nl> muts@estec.esa.nl (Peter Mutsaers) writes:
>The implications can be complex, but that is more due to OO than to
>C++ in particular. But it pays for most applications.
I am always amused by these arguments that the complexity of C++ is due to some villain like OO or C compatibility, since Objective-C provides such a ready counterexample.