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

Reply via email to