Tell us your DIP1000 woes

H. S. Teoh hsteoh at qfbox.info
Thu Aug 29 19:51:29 UTC 2024


On Thu, Aug 29, 2024 at 07:38:50PM +0000, Paul Backus via Digitalmars-d wrote:
[...]
> To be clear, the issue here is not that the *implementation* requires
> `unsafe`/`@trusted`. The issue is that under the current system, it is
> impossible to give `swap` a `@safe` *function signature* that accepts
> `scope` arguments.
> 
> That's why I left the body of the `swap` function out of my example.
> It's completely irrelevant.

Exactly; this is why 'scope' is an inadequate solution to the wrong
problem.

The whole discussion about lifetimes in D sounds like D really, badly,
wants a Rust-like lifetime system, but, not wanting to ape Rust, which
is considered too complex, we're trying instead to shoehorn various
simple but incomplete solutions to try to pretend to solve the original
problem.

I appreciate Walter's efforts to find simple solutions to problems --
that's the quality of a worthy engineer -- but some problems are simply
inherently complex, and any solution that's simpler than the minimum
complexity simply cannot be made to work, no matter how hard you try.
More and more, lifetime tracking is appearing to be one of these
problems. Any solution less complex than Rust's seems doomed to fail on
some obscure corner case that will nevertheless compromise the entire
solution.


T

-- 
Nearly all men can stand adversity, but if you want to test a man's character, give him power. -- Abraham Lincoln


More information about the Digitalmars-d mailing list