Newsgroups: comp.std.c++
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: casting "const" to "non-const"
Message-ID: <1990Aug2.164129.25231@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <56159@microsoft.UUCP> <56163@microsoft.UUCP> <1913@ux.acs.umn.edu> <GLENN.90Aug1145326@huxley.bitstream.com>
Date: Thu, 2 Aug 90 16:41:29 GMT

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
