If you could make any changes to D, what would they look like?
Paul Backus
snarwin at gmail.com
Sat Oct 30 00:29:00 UTC 2021
On Friday, 29 October 2021 at 21:16:49 UTC, H. S. Teoh wrote:
> Array operations are OK if we view them as intrinsic, opaque
> operations that the pure abstraction grants us.
My point is that in a systems-level language like D, where the
side effects of memory allocation are directly observable from
normal code [1][2], operations that allocate memory are *not*
opaque, pure abstractions, and cannot possibly be "viewed" as
such.
I understand that, historically, this kind of argument has
(successfully) been used to justify things like `pureMalloc` and
pure array concatenation, but the argument is based on a false
premise, and always has been.
[1] https://dlang.org/phobos/core_memory.html#.GC.stats
[2] https://dlang.org/phobos/core_memory.html#.GC.query
More information about the Digitalmars-d
mailing list