Worst ideas/features in programming languages?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Oct 18 11:08:08 UTC 2021


On Friday, 15 October 2021 at 23:58:34 UTC, deadalnix wrote:
> So using a GC instead of malloc/free is very much viable. In 
> fact, because we know if something is shared or not, I bet we 
> can do something that is even faster than traditional mallocs.

Well, yes, malloc is only the default, when people want speed in 
system level programming they create their own allocators.

In order to get to a competitive advantage, D has to decide what 
its primary use case is. Maybe it would be better for D to 
position itself as a higher level language with some lower level 
features.

I think also GC and malloc can be combined and improved on. You 
could probably get better performance and less fragmentation if 
the allocation contained a hint of when it statistically would be 
released. You could also get better performance by providing 
information about typical allocation patterns and sizes.

But without a clear vision of what the key use cases for the 
language is, getting a direction on all of this is going to be 
difficult. (Much easier to make tough decision if you have a 
clear picture of what the main use scenario is.)



More information about the Digitalmars-d mailing list