const int vs. int const

Mike via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 15 16:33:49 PDT 2014


On Friday, 15 August 2014 at 21:08:10 UTC, Jonathan M Davis wrote:
> I still think that we'd be far better off if all attributes 
> which could apply to a function's return type were illegal on 
> the left-hand side of the function. All allowing it on the left 
> does is cause confusion and bugs. It's already best practice to 
> put it those attributes on the right, because if you don't, 
> everyone who reads the code ends up asking whether the 
> attribute was supposed to apply to the return type, and the 
> parens were forgotten, or whether it was supposed to apply to 
> the function.

Sounds like a worthwhile impromement to me.

Mike



More information about the Digitalmars-d mailing list