Newsgroups: comp.lang.c++
Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!geac!alias!rae
From: rae@alias.com (Reid Ellis)
Subject: Re: Better Encapsulation: Overload Keywords
Message-ID: <1991Jun25.224022.20072@alias.com>
Sender: news@alias.com (0000-news(0000))
Organization: Alias Research, Inc., Toronto ON Canada
References: <1991Jun23.223737.31644@kuhub.cc.ukans.edu>
Date: Tue, 25 Jun 1991 22:40:22 GMT

<blythe@kuhub.cc.ukans.edu> writes:
|while(object)	//better encapsulation
|{
|	...
|}
...
|Overloaded keywords could let us get away from code like this:
|		while(object.status()) {...}
|to simply:
|		while(object) {...}

This can easily be accomplished right now by providing an "operator
void *" method, like the iostream classes do.  This is why you can say:

	while(cin)
	{
		cin >> buf;
		// etc..
	}


					Reid
--
Reid Ellis                                            
rae@utcs.toronto.edu        ||           rae@alias.com
CDA0610@applelink.apple.com ||  +1 416 362 9181 [work]
