| |
 | Posted by Manu | Permalink Reply |
|
Manu 
| On Wed, 19 Mar 2025 at 12:31, Jonathan M Davis via Digitalmars-d < digitalmars-d@puremagic.com> wrote:
> On Tuesday, March 18, 2025 8:18:13 PM MDT Meta via Digitalmars-d wrote:
> > "This language is garbage collected, and they're fucking ashamed of that!"
> >
> > This guy is surprisingly perceptive and 100% accurate with his cutting observations hahaha.
>
> Plenty of us aren't (in fact, personally, I'd never have gotten into D if
> it
> didn't have a GC), but it certainly comes across that way a lot of the time
> because of attempts to make the folks happy who don't want the GC. IMHO,
> while being able to do stuff without using the GC is great, we've harmed
> ourselves by continually trying to make C/C++ people who hate the GC happy
> with D. And we keep getting into arguments about how to do stuff because
> there's a divide between those folks who are happy that D has a GC and
> those
> who don't want anything to do with the GC. The result is kind of
> schizophrenic.
>
> - Jonathan M Davis
>
We should have a 2-tier system, low-level functions to do the work which
don't enforce a particular runtime ecosystem, and then some helpful
wrappers that add convenience for scripting.
I reckon a similar and probably bigger problem for phobos though is the
template over-application and bloat. That should be addressed in the same
stroke with a low-level implementation; effort should be made to minimise
template args, and then all the high-level template-ey stuff that does all
sorts of adaptation should be in the higher level.
I never want to see 8 different copies of a function because it's called
with byte,ubyte,short,ushort,int,uint,long,ulong... where one opcode is
different because it performed a different width sign-extension, and where
the sign-extension should have been performed by the calling code anyway!
Phobos is lousy with this sort of problem, and the binaries it produces are
orders of magnitude bigger than they should be a lot of the time. Very
aggressive optimisation might fix it, but it's basically just random chance
as to whether optimisation will successfully collapse some insane code down
to something appropriate or not.
|