Rant time? Rant time.
drug2004 at bk.ru
Tue Sep 22 10:51:35 UTC 2020
On 9/22/20 1:23 PM, FeepingCreature wrote:
>> (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.
For example in GUI code widgets reference each other all over the place.
Cyclic dependencies are the reason that Rust has no GUI even like
dlangui despite Rust community has much more resources. So I totally
agree to IGotD: "People who ask for required ownership often don't know
what they are asking for."
More information about the Digitalmars-d