From 639903999827598444
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,ede379f5dbbc1549
X-Google-Attributes: gidf78e5,public
From: Hyman Rosen <hymie@prolifics.com>
Subject: Re: Suggestion: "typeof" keyword
Date: 1999/08/11
Message-ID: <t7aerz1pxp.fsf@calumny.jyacc.com>#1/1
X-Deja-AN: 511350528
Content-Transfer-Encoding: quoted-printable
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <7nt3vl$1oe$1@nnrp1.deja.com> <7oh7o8$t3f$1@nnrp1.deja.com> <37AE541B.A998F729@cs.utu.fi> <cTqioZABDwr3EwfO@robinton.demon.co.uk> <37AFAC37.6B7F4253@cs.utu.fi>
X-Original-Date: 10 Aug 1999 13:54:58 -0400
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 934352577 19538 128.250.29.17 (11 Aug 1999 06:22:57 GMT)
Organization: PANIX Public Access Internet and UNIX, NYC
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN7EWseEDnX0m9pzZAQHS7AF/fI4tzsEfYJBTjyTqYyZNxipoSkZzqpO7 OoXgEdCBd+p9SVZg24/0vrUikuCWD7/s =1wH6
Mime-Version: 1.0
User-Agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.3
NNTP-Posting-Date: 11 Aug 1999 06:22:57 GMT
Newsgroups: comp.std.c++
X-MIME-Autoconverted: from 8bit to quoted-printable by ncar.UCAR.EDU id LAA11216

Jaakko J=E4rvi <jaakko.jarvi@cs.utu.fi> writes:
> If we had typeof, declare could be implemented as a macro (with
> different syntax though):
> #define DECLARE(VAR,EXPR) typeof(EXPR) VAR =3D EXPR
> Consequently, the implementation should be=20
> more or less straightforward.

The C++ committee has adopted an Occam's Razor approach, which dictates
that redundant facilities already implementable within the language will
not be added. Given that declare is easily implementable given typeof,
while typeof is not implementable in terms of declare, there is no chance
that declare would be adopted.

This is a good thing.
---
[ 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              ]



