Transitive const sucks
Bruce Adams
tortoise_74 at ya.thewho.co.uk
Wed Sep 12 05:59:56 PDT 2007
Janice Caron Wrote:
> Even something as simple as this needs logical const
>
> class MyMathClass
> {
> invariant int multiply(int x, int y) /* logically const */
> {
> debug logfile.writeLine("multiply.called");
> return x * y;
> }
>
> debug private Stream logfile;
> }
>
> You can't tell me that's not a real world need.
>
> Even something as simple as this needs logical const<br><br>class MyMathClass<br>{<br> invariant int multiply(int x, int y) /* logically const */<br> {<br> debug logfile.writeLine("multiply.called");
> <br> return x * y;<br> }<br><br> debug private Stream logfile;<br>}<br><br>You can't tell me that's not a real world need.<br><br>
>
BTW if there any chance you can change your mail options not to post in both html and text. Every single message of yours is duplicated twice on http://www.digitalmars.com/webnews.
Thanks.
More information about the Digitalmars-d
mailing list