Generic programming ramifications of const by default
Bent Rasmussen
incredibleshrinkingsphere at gmail.com
Mon Jun 11 14:05:03 PDT 2007
I had the same thought.
Is const-by-default everywhere feasible?
It would certainly be consistent.
> How bad would it be to make const by default apply to all references
> including locals?
> If inout, ref, out and friends were considered to be part of the type then
> this would make thing the same everywhere.
> I'd be willing to consider that even if it means that some type tuples end
> up having types in them that can only be used as parameter types.
>
> alias T!(in int, out char[], ref float) args;
> void thing(args){...}
>
>
More information about the Digitalmars-d
mailing list