On Sunday, 1 October 2023 at 13:24:27 UTC, dhs wrote:
On Sunday, 1 October 2023 at 13:05:12 UTC, Steven Schveighoffer
wrote:
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
[...]
Std::vector uses value semantics. D does not have anything
like that. It could be done someone just has to do it.
Yes, and therein lies the problem: writing a dynamic array is
not a very difficult task for an old developer like me. I
looked at the D runtime and at the Phobos implementation for
reference. The code is so extremely difficult to understand and
uses so many advanced D features, that I doubt that I am up to
the task. For me, the point of switching to D was to use a
language that is simpler to read and maintain.
The complexity is from the way d does operator overloading and
indexing.
It should be pretty straightforward. I’ll see if I can post a
simple wrapper.
-Steve