🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: virtually typed return values [WAS: the most dissatisfying part of c++]

#239
From: Roland Schemers III
Date: Thu, 02 Aug 1990 18:03
46 lines
2015 bytes
>
>|In otherwords, make the return type 'virtual' like functions. 
>
>This is nice in that it uses an already key word.  However, this
>would be too easily mixed up with people just forgetting to put
>type names in their functions.
>

Yea, I realized the conflict with virtual functions after I sent the message.
Plus:
	virtual virtual&method();

Is quite ugly!!!!

>how about
>
>	virtual class& method();
>
>instead? "class" is already a keyword and it even sounds like what

wouldn't this cause problems with functions like:

	virtual class X& method();

Where X is a class name? I'm not sure if this is legal syntax, but it
seems to me you should be able to qualify the X with the class keyword.


>But you're right, this sounds like the syntax proposed for templates, 
> so maybe they will solve this problem without this changed syntax.
>

I hope templates solve this problem, if not, maybe a new keyword plus
some extra effort on the C++ translator/compiler is needed to solve this 
problem!

>					Reid
>
>Reid Ellis  264 Broadway Avenue, Toronto ON, M4P 1V9               Canada
>rae@gpu.utcs.toronto.edu || rae%alias@csri.toronto.edu || +1 416 487 1383

-- 
Roland J. Schemers III                              Systems Programmer 
schemers@vela.acs.oakland.edu (Ultrix)              Oakland University 
schemers@argo.acs.oakland.edu (VMS)                 Rochester, MI 48309-4401
"Get off your LEF and do something!"                (313)-370-4323
Technical Details
Message-ID: <2351@vela.acs.oakland.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!samsung!umich!vela!schemers
References: <27634@netnews.upenn.edu> <2314@vela.acs.oakland.edu> <rae.649525332@fred>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!samsung!umich!vela!schemers
From: schemers@vela.acs.oakland.edu (Roland Schemers III)
Newsgroups: comp.std.c++
Subject: Re: virtually typed return values [WAS: the most dissatisfying part of c++]
Message-ID: <2351@vela.acs.oakland.edu>
Date: 2 Aug 90 18:03:14 GMT
References: <27634@netnews.upenn.edu> <2314@vela.acs.oakland.edu> <rae.649525332@fred>
Reply-To: schemers@vela.acs.oakland.edu (Roland Schemers III)
Organization: Oakland University, Rochester MI
Lines: 46