If you could make any changes to D, what would they look like?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Oct 25 17:37:47 UTC 2021


On Monday, 25 October 2021 at 17:23:01 UTC, Dennis wrote:
> - Module constructors make it hard to see what's happening when 
> the program starts. I once submitted a D program for an 
> assignment and it failed because it loaded local files for 
> unittests in a module constructor, which I forgot to remove 
> because I only looked at main.

But I think you need it if you want to create module-specific 
allocators? Otherwise users of the module have to remember to add 
initializers and destructors externally.

To prove that at compile time takes a very complex type system, I 
think? And checking it at runtime has a performance impact 
(unless you do runtime patching, which gets ugly real fast).



More information about the Digitalmars-d mailing list