Who wore it better?

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 15 13:45:30 PDT 2016


On 4/15/16 4:34 PM, Andrei Alexandrescu wrote:
> On 04/15/2016 04:16 PM, Steven Schveighoffer wrote:
>> If you find such advertisement useless, you of course do not need inout
>> or const.
>
> Let's not exaggerate by putting them together. -- Andrei

This is not an exaggeration. inout and const have pretty much the same 
benefits and drawbacks, with only a couple of major differences. The 
main feature of const/inout is advertisement of non-mutation. Otherwise, 
we could do with just mutable and immutable + templates.

-Steve


More information about the Digitalmars-d mailing list