Can we just have struct inheritence already?
Exil
Exil at gmall.com
Tue Jun 25 03:01:16 UTC 2019
On Monday, 24 June 2019 at 21:20:21 UTC, Meta wrote:
> On Monday, 24 June 2019 at 21:13:17 UTC, XavierAP wrote:
>> Nowadays quite some people are reacting by going back to C,
>> plain composition, and their dogma is that dangling pointers
>> are
>> the least problem.
>
> These people are insane. Long compile times and high compile
> memory usage create problems for developers. Dangling pointers
> create problems for developers AND users (very nasty problems
> at that).
>
> C cannot die quickly enough. We should be working to kill it,
> not bring about its resurgence.
C++ is more so the one with how long it takes to compile. C isn't
that bad. I don't see anything replacing C, there are a number of
different languages that could but they are all fragmented.
DMD can eat a lot of memory, it also isn't very efficient.
static foreach(i; 0 .. 0xFFFF) {}
the above code eats up over 12 GB of RAM. That's all my free RAM
+ whatever it is using on my drive. It also takes a REALLY long
time to execute, at least an hour. I gave up after that. Spends
almost all of it's time doing Array operations. DMD has a really
weird implementation of Array, looks like it was implemented
possibly in D1 days. Reserve(int) is additive, sure fine w/e.
Passing around arrays as points, so need to dereference them to
actually use them... Then you have insert(Range) that does a
reserve(), which allocates new memory, copies all the data. Then
the insert moves all the data it just copied. Sure the code is
simpler but it has horrible performance, especially when there is
a loop that is constantly adding and removing from the
front/middle of the array.
More information about the Digitalmars-d
mailing list