2 ms·
D doesn't allow pointer arithmetic in @safe code. At first it seems like that cannot work, but it works very well. Pointer arithmetic is relegated to functions
by WalterBright 6mo ago
D doesn't allow pointer arithmetic in @safe code. At first it seems like that cannot work, but it works very well. Pointer arithmetic is relegated to functions that are @system.
The reason it works is because D has actual array types.
If you choose to use automatic memory management with D, you are memory safe.
- jjmarr 6mo agoI'm referring to C heavily using pointer arithmetic. If you wanted to make it easier to convert arbitrary functions to use your shiny new resizable type, you end up with something simulator to iterators.