Tell us your DIP1000 woes

Atila Neves atila.neves at gmail.com
Fri Aug 30 10:17:16 UTC 2024


On Thursday, 29 August 2024 at 19:38:50 UTC, Paul Backus wrote:
> On Thursday, 29 August 2024 at 16:10:37 UTC, Atila Neves wrote:
>> On Wednesday, 28 August 2024 at 14:48:04 UTC, Paul Backus 
>> wrote:
>>> [...]
>>
>> Interesting, thank you. I went and looked at how Rust fixes 
>> this and as I expected it's with an `unsafe` block: 
>> https://doc.rust-lang.org/1.80.1/src/core/mem/mod.rs.html#728
>
> 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.

Ah. Yes, that's bad.


More information about the Digitalmars-d mailing list