Tell us your DIP1000 woes

Walter Bright newshound2 at digitalmars.com
Mon Aug 26 19:43:30 UTC 2024


That is correct, I was just thinking of using @trusted to avoid checks, rather 
than ensuring safe code.

The reason inference is not done automatically for all functions is because:

```
int* foo(int*);
```
```
int* foo(int* p) { return p; }
```

are different functions.

Inference affects the name mangling of D functions. So, for D functions, the 
program will fail to link with inferred attributes.

But with C and C++ linkage, the name mangling isn't reflected in the symbol name.

I suppose it's a problem we can live with.

Attribute inference isn't perfect, either, but it may work well enough to make 
dip1000 more palatable.


More information about the Digitalmars-d mailing list