News for hackers. Stuff that matters.
Re:The Two Factions of C++ by WalterBright on Tuesday November 26, 2024 @04:32PM (#42250284)
> So there's no losing track of what allocates and what doesn't.

Having an allocator implicitly passed in with a struct argument is not quite what I meant. D once had allocators as member functions, but that wound up being deprecated because the allocation strategy is only rarely tied to the struct.

Re:The Two Factions of C++ by samatman on Tuesday November 26, 2024 @06:15PM (#42251202)
There are some meaningful differences between Zig and D in this specific area, specifically, D uses exceptions and has garbage collection as the default memory strategy. That will surely result in different approaches to the leaf-allocation question being better for the one than for the other.