any news on const/invariant?
Nathan Reed
nathaniel.reed at gmail.com
Mon Nov 26 23:23:41 PST 2007
Janice Caron wrote:
> I guess it could change its own local copy of the pointer, but that
> would just be a bug local to the function.
One which, I would think, should be caught by the type system. However,
if there's no 'final', I guess this can't be done.
On the other hand, maybe the compiler should just emit a warning when a
passed-by-value parameter is written to. If you really do want to
change your local copy of a parameter you can always copy it to a variable.
Thanks,
Nathan Reed
More information about the Digitalmars-d
mailing list