Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"

Jesse Phillips via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu May 29 07:25:05 PDT 2014


On Thursday, 29 May 2014 at 10:41:59 UTC, Kagamin wrote:
> On Wednesday, 28 May 2014 at 05:40:26 UTC, Jesse Phillips wrote:
>> When he explained why C++ inferred a const int type as int, he 
>> tripped me up because D does drop const for value types.
>
> Hmm, this bit me (doesn't compile):
> void f(in char[] s)
> {
>   auto s1=s;
>   s1=s;
> }

I suppose at this point you know:

     void f(const(char)[] s);

I understanding that expected may not be the same as simple. But 
you did ask for s1 to be const then tried to modify it.


More information about the Digitalmars-d-announce mailing list