From -3342374650722953724
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ede379f5dbbc1549
X-Google-Attributes: gidf78e5,public
From: "David J. Littleboy" <davidjl@gol.com>
Subject: Re: Suggestion: "typeof" keyword
Date: 1999/08/16
Message-ID: <okQt3.2611$2b.480278@nnrp.gol.com>#1/1
X-Deja-AN: 513325466
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <7nt3vl$1oe$1@nnrp1.deja.com> <37AFAC37.6B7F4253@cs.utu.fi> <7opt86$pku$1@nnrp1.deja.com> <7p0ks0$1i7$1@mulga.cs.mu.OZ.AU> <FGEyJK.GLB@research.att.com>
X-Original-Date: Mon, 16 Aug 1999 08:53:40 GMT
Content-Type: text/plain; charset="iso-2022-jp"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 934800638 8559 128.250.29.17 (16 Aug 1999 10:50:38 GMT)
Organization: Global Online Japan
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN7fs7OEDnX0m9pzZAQGidQGAlYtu/YrVzm7pEzMq47VrzJZScpbayCI0 Vi52pQICNnA8WPesjnjeACglRfRca3X7 =nzxJ
Mime-Version: 1.0
NNTP-Posting-Date: 16 Aug 1999 10:50:38 GMT
Newsgroups: comp.std.c++

Andrew Koenig wrote in message ...

>Actually, it's much more profound than that:  If we had "declare",
[snip]
>it would be possible to write
>
> declare copy(declare begin, declare end, declare out)
> {
> while (begin != end)
> *out++ = *begin**;
> return out;
> }
>
>Here, the type of the expression in the "return" statement would
>determine the return type of the function!

This one's been done before. It was a feature of BBN Lisp around 1972 called
DWIM: do what I mean.

David J. Littleboy
@ducking.for.cover.com
---
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html              ]



