Few recent dmd pull requests
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jun 26 07:32:35 PDT 2014
Meta:
>> const* p2 = new int(3); // const(int)*
>
> Won't some people, especially those coming from C++, mistake
> this for being syntax to create a constant pointer to a mutable
> int?
C/C++ const is very different from D one (transitive), so C++
programmers must learn the differences.
If a C++ mistakes that for a constant pointer to a mutable int,
and tries to modify the int, she receives a compilation error. So
this doesn't seem able to cause bugs or significant problems.
Bye,
bearophile
More information about the Digitalmars-d
mailing list