From 8530635672983370303
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ccb40040597f37a7
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-03-17 13:29:42 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: allan_w@my-dejanews.com (Allan W)
Newsgroups: comp.std.c++
Subject: Re: Extending enums (was Re: Forward declaration of enum)
Date: Mon, 17 Mar 2003 21:29:41 +0000 (UTC)
Organization: http://groups.google.com/
Lines: 28
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <7f2735a5.0303131117.76e3c312@posting.google.com>
References: <HFeba.21313$gi1.5997@nwrdny02.gnilink.net> <memo.20030312121731.48443A@brangdon.madasafish.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: mail2news.demon.co.uk 1047936581 5827 10.0.0.1 (17 Mar 2003 21:29:41 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Mon, 17 Mar 2003 21:29:41 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 18v2Au-0001Vo-00
	for mail2news@news.news.demon.net; Mon, 17 Mar 2003 21:29:40 +0000
X-Received: by mulga.cs.mu.OZ.AU
	id IAA01775; Tue, 18 Mar 2003 08:29:37 +1100 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ncar.ucar.edu
X-Newsgroups: comp.std.c++
X-NNTP-Posting-Date: 13 Mar 2003 19:17:44 GMT
X-Spam-Status: No, hits=-8.4 required=5.0
	tests=NOSPAM_INC,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01
	version=2.41
Xref: archiver1.google.com comp.std.c++:18332

brangdon@cix.co.uk (Dave Harris) wrote
> hyrosen@mail.com (Hyman Rosen) wrote (abridged):
> > Even when doing overloading by return types, overload resolution
> > isn't that complicated to implement. And the problem was solved
> > decdes ago.
> 
> I don't have a reference, but I recall Stroustrup saying that he knew well 
> how to implement overloading by return type. It's easy for compilers. He 
> rejected it because he thought it was difficult for humans.

My recollection is different (although I don't at this minute have
access to anything at all to try to look it up). It seems to me that
Stroustrup didn't want the division in this expression
    int i = 10 / 3;
to behave any differently than the division in this expression:
    float x = 10 / 3;
Integer division should always be integer division, regardless of
what's going to be done with the result.

At least, that's what I think he had in mind. Naturally, he would have
explained it much better than I'm doing...

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



