What am I missin with const?

deadalnix deadalnix at gmail.com
Tue Jan 29 01:38:14 PST 2013


On Tuesday, 29 January 2013 at 09:10:28 UTC, bearophile wrote:
> deadalnix:
>
>> I wish this syntax will be fixed, but I have no hope. We just 
>> will see the problem popping again and again I guess.
>
> I asked for that fix, but Walter closed down that request in 
> Bugzilla. I still think he was wrong.
>
> I now open a smaller request that can't fix the problem fully:
> http://d.puremagic.com/issues/show_bug.cgi?id=9422
>

Well I think the error message you propose isn't possible as it 
would cause many problems in generic code.

const applied to the rturn type should be the way to go. It is 
basically what everybody except at first when looking at the 
code. But it is probably too late to change that.


More information about the Digitalmars-d mailing list