An Orthogonal Const Proposal
Paul Anderson
paul.d.anderson.removethis at comcast.andthis.net
Fri Dec 7 11:53:40 PST 2007
Oskar Linde Wrote:
> Since everyone is doing it, the peer pressure got too heavy and I just
> felt I too had to make a const proposal ready to be shot down. :)
>
> Anyway, here is a very simple orthogonal const proposal that I believe
> catches most of the earlier suggestions in a more concise way.
>
> Since the table below probably will become squished by the news reader,
> I made a small PDF:
>
> http://www.csc.kth.se/~ol/const.pdf
>
> Please prime and load your muskets. Enjoy :)
>
I like the orthogonal emphasis of this proposal. Rather than having to decide what "const" means in a particular context, it always means the same thing. Ditto for "in" (I prefer "readonly").
If these keywords can capture all the varieties of const/invariant that have been proposed I would vote for it.
I'll take a look at this vs. guslay's list of const meanings and, unless someone beats me to it, post the results.
Paul
More information about the Digitalmars-d
mailing list