C is Brittle D is Plastic

Walter Bright newshound2 at digitalmars.com
Wed Mar 25 02:32:43 UTC 2026


On 3/24/2026 12:23 PM, user1234 wrote:
> https://www.boxyuwu.blog/posts/an-incoherent-rust/

If I understand this correctly, D has solved this problem:
```d
import a;   // exports 'x'
import b;   // exports 'x'

int z = x; // error, multiple definition of 'x'
```
The resolution:
```d
import a;   // exports 'x'
import b;   // exports 'x'
alias x = b.x;

int z = x; // b.x is selected
```


More information about the Digitalmars-d mailing list