TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JERRY COFFIN
from: FRANK ADAM
date: 1997-08-28 16:05:00
subject: ctors

On Aug 24 09:04, 1997, Jerry Coffin of 1:128/166.5 wrote:
G'day Jerry,
CR>> Maybe Jerry knows the exact rationale?
JC>     someClass x;
JC>     someClass *x = new someClass;
JC> how would you manage to look at a return value from the ctor in either
Makes sense. :-) 
JC> To manage this, you'd have to invent some _entirely_ new syntax and
JC> semantics that don't bear even minimal resemblence to anything in C.
I believe it should've been done. After all C++ is not C and classes are 
unique to the former. It's very possible that by default a class may be 
initialized similarly to a structure,but once a user defined ctor is used it 
becomes a definite (be it implicit) function call. IMHO, all of a sudden the 
syntax 
just disallowed the checking of a return value from a function.   
JC> E.g. you could invent a method of returning two entirely separate 
JC>     int status;
JC>     someClass *object;
JC>     status, object = new someClass;
Or could've been..
int status;
someClass *object;
object = new someClass(&status);
someClass x(&status);
Of course there would be no "no arg" constructors.
Anyway i was just thinking aloud, i don't think compiler vendors upon 
reading this, would rush off to change the language just for me.:-)
 Regards, Frank
--- Msged 4.00
---------------
* Origin: The ticking point, Melbourne, Australia. (3:635/728.21)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.