From -3401161619249956340
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,d40995f71ce940ac
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1990-08-02 09:41:29 PST
Path: gmdzi!unido!mcsun!uunet!mailrus!news-server.csri.toronto.edu!utgpu!utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Newsgroups: comp.std.c++
Subject: Re: casting "const" to "non-const"
Message-ID: <1990Aug2.164129.25231@zoo.toronto.edu>
Date: 2 Aug 90 16:41:29 GMT
References: <56159@microsoft.UUCP> <56163@microsoft.UUCP> <1913@ux.acs.umn.edu> <GLENN.90Aug1145326@huxley.bitstream.com>
Organization: U of Toronto Zoology
Lines: 14
Posted: Thu Aug  2 17:41:29 1990

In article <GLENN.90Aug1145326@huxley.bitstream.com> <glenn@bitstream.com> (Glenn Parker) writes:
>Until recently (after C++ invented it), C did not have "const".  Therein
>lies some confusion.  I submit that it is absurd to put const in the same
>category with other type names.  Const is not a typename, it is a storage
>qualifier, like "auto" and "static"...

The real, underlying problem here is precisely whether const *is* a
storage qualifier or not, by intent.  Unfortunately, const gets used for
two very different purposes:  "this is really, truly, a constant" and
"I may be allowed to modify this but you aren't".  It might have been
better to use different words for these two uses.  It's a bit late now.
-- 
The 486 is to a modern CPU as a Jules  | Henry Spencer at U of Toronto Zoology
Verne reprint is to a modern SF novel. |  henry@zoo.toronto.edu   utzoo!henry


