Protected parameters, 2nd try_(re)
11 Mar 97 07:10:12 EST
> would it be necessary that const parameters have
> clear semantics concerning side-effects?
It doesn't hurt to document them. But the standard already defines protected var
as alias dependent, so you should not use that case (it's always a bug, there is
no program where this feature is useful or required). I've been hurt by using
Borland's const a few times myself (in a case like Peter described).
BTW, const and protected var are the same. There is no difference between them.
This is mainly a way of saying: this var shouldn't altered (source code as
documentation) and speed up it's parameter passing.
protected is: this variable shouldn't be altered, even if I make a mistake (by
aliasing some things), parameter passing speed is not a problem.
Groetjes,
Berend.
Berend de Boer (100120.3121@CompuServe.COM)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es