Rationale for allowing const T* = T* wanted.

Doug Gwyn gwyn at smoke.brl.mil
Wed Feb 20 11:15:06 AEST 1991


In article <10034 at dog.ee.lbl.gov> torek at elf.ee.lbl.gov (Chris Torek) writes:
>I believe things would be `better' if the language freely allowed
>conversion between `char **' and `const char **' and `char * const *'
>and `const char * const *', for instance.

I think it is recognized that the special meaning given to "pointer
to const" as a function parameter is less than a complete
realization of the basic idea.  Attempts to extend the semantics
past the topmost level of referencing simply didn't come out right,
so we compromised on getting the intention right for one level and
leaving deeper levels less convenient than one might want.  If anyone
can fix this for some other standard such as C++, more power to them.



More information about the Comp.std.c mailing list