From 4533943331333793554
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,c491eb430f6ab75a
X-Google-Attributes: gidf78e5,public
From: fjh@murlibobo.cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: How about #depricate
Date: 1997/02/22
Message-ID: <5elr8j$mkq@mulga.cs.mu.OZ.AU>#1/1
X-Deja-AN: 220709953
References: <330B4E75.16FE@strata3d.com> <330CD371.2225@mds.rmit.edu.au>
X-Original-Date: 22 Feb 1997 04:04:35 GMT
Organization: Comp Sci, University of Melbourne
X-Auth: PGPMoose V1.1 PGP comp.std.c++
Newsgroups: comp.std.c++
Originator: austern@isolde.mti.sgi.com


Marcelo Cantos <marcelo@mds.rmit.edu.au> writes:

>I assume the purpose of #deprecate is
>to get the compiler to tell the programmer where all the instances
>of this keyword are located.  This could easily be addressed by going:
>
>  #define identifier !@$%
>
>Your compiler will then flag all the occurring instances as errors.

No, you misunderstand the purpose.  The aim is to flag all uses of the
entity _without_ breaking the code.  As a library vendor, breaking your
users' code will make you unpopular.  It's much better to use a warning
to encourage them to change their code than to just come out and break
it.

>An easier approach is to use grep.

No, that's not going to help at all.  There's no way that a library
implementor can `grep' all their client's code.

Anyway, both `grep' and the proposed `#deprecate' have the wrong
granularity; you want to deprecate particular member functions,
for example, not identifiers.

>In reality I don't think many identifiers are deprecated and the
>compiler vendors usually issue warnings of this nature anyway.

Yes, compiler vendors do this sort of thing often.  The point of this
extension would be to give library implementors the power to do the same.

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



