Rant time? Rant time.

FeepingCreature feepingcreature at gmail.com
Tue Sep 22 10:23:56 UTC 2020

On Tuesday, 22 September 2020 at 10:00:46 UTC, Ola Fosheim 
Grøstad wrote:
> On Tuesday, 22 September 2020 at 09:47:44 UTC, IGotD- wrote:
>> People who ask for required ownership often don't know what 
>> they are asking for. If ownership (single of course) is 
>> introduced, many data structures will no longer work. Right 
>> now one of D's benefits is that many data structures just work 
>> out of the box and even with GC.
>> I want a sea of objects, single ownership is way too limiting.
> ...
> (I think "provably memory safe" is too expensive in terms of 
> development freedom and time, so ignore that aspect. "Safer" is 
> good enough. "Safe" isn't really needed or realistic.)

I concur with this. The point is to make it possible to write 
good code, not to force you into what I think the way to write 
good code is.

In my experience, 90% of memory allocations are owned by one 
declaration and only visible inside its lifetime. My dream goal 
is to have references be "well-behaved" by default - scoped, 
nonnullable, immutable, nonreferentiable - where each of those 
can be opted out of as desired. Given such references, it's 
usually easy to do correct memory management automatically.

More information about the Digitalmars-d mailing list