Properties and const

Daniel Keep daniel.keep.lists at gmail.com
Wed Sep 12 00:27:50 PDT 2007


Some ideas:

1) Require that const/invariant types as the return type of a function
use parentheses.

2) Place the "const/invariant" keyword between the type and the function
name.

Personally, I think #1 is the best solution since it will still allow for:

invariant
{
    int* foo();
    void bar();
}


That said, it's likely to catch newbies out.

	-- Daniel



More information about the Digitalmars-d mailing list