🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #270

Re: the most dissatisfying part of c++

#270
From: Jim Heliotis
Date: Fri, 03 Aug 1990 18:51
33 lines
1840 bytes
From article <56236@microsoft.UUCP>, by bobatk@microsoft.UUCP (Bob ATKINSON):
> 
> The change to the existing rules is to allow overidings of virtual
> functions to return a type to which a standard conversion may be
> applied to obtain the inherited return type.  ("standard conversion"
> may be too general; perhaps only derived-to-base standard conversions
> should be applicable).  The appropriate member function signature would 
> be chosen according to the static type of the pointer through which
> it is invoked.
> 
OK, I'll put my two cents in:

- Look at Eiffel.  They do this with some sort of type attribute called
  something like "SAME AS", so you could declare you are returning an
  object the same type as one of your arguments.
  This works because I believe Eiffel's implementation includes class ids
  in objects, but I could be wrong.

- It appears to be hard to solve this problem without dynamic class ids.

- Most C++ classes relevant to this need /have\ dynamic class ids -- their
  virtual function table addresses!  Now, this does not help much when dealing
  with persistent objects, but is it worth a shot?

I have intentionally not given details on my thoughts, to prevent undue noise
on the net.  I'd be happy to work this out some more if anyone wants (I may
do that anyway!).

				Jim Heliotis
				Rochester Institute of Technology
				Rochester, NY 14623-0887
				jeh@CS.RIT.EDU
				{allegra,seismo}!rochester!rit!jeh
Technical Details
Message-ID: <1816@cs.rit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cornell!rochester!rit!jeh
References: <56236@microsoft.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cornell!rochester!rit!jeh
From: jeh@cs.rit.edu (Jim Heliotis)
Newsgroups: comp.std.c++
Subject: Re: the most dissatisfying part of c++
Message-ID: <1816@cs.rit.edu>
Date: 3 Aug 90 18:51:39 GMT
References: <56236@microsoft.UUCP>
Sender: news@cs.rit.edu
Reply-To: jeh@cs.rit.edu
Lines: 33