any news on const/invariant?

Janice Caron caron800 at googlemail.com
Wed Nov 28 12:44:05 PST 2007


On 11/28/07, Bill Baxter <dnewsgroup at billbaxter.com> wrote:
> Acutally, when comparing side by side with "static", that starts to
> sound reasonable.   Both are mucking with func's implicit 'this'
> paramter (static eliminates it, const makes it const).

Put like that, it does make sense.

But then, at global scope, a static function is one which does
compile-time function execution. Both const and static change their
meaning when applied to functions inside a class.

I can live with the existing const-at-the-front syntax. It's not what
I'd prefer, but I can live with it. But if we do keep it, please let's
ditch const-at-the-back. Two different syntaxes is even more confusing
than what we have now. I mean, I can't write

    int f() static;

now, can I?



More information about the Digitalmars-d mailing list