On Monday, 27 May 2019 at 14:26:16 UTC, ag0aep6g wrote:
Oh, yeah. Getting @trusted right is hard. Getting it right when user-provided types are involved is extra hard, because you can't even trust fundamental operations like assignment or copying.

In my point of view @trusted means "I use pointer-related operations correctly. Also I am using all @system interfaces correctly". The code in question uses allocator interface correctly. User of this code has a contract to supply allocator that conforms to this interface. If a user supplies mallocator that is not correct, there are two possibilities:

- Allocator is buggy. Nothing to do with @trusted code.
- Allocator do not conforms to allocator interface. User has broken the contract. Nothing to do with @trusted code.

I think we should keep in mind not only technical aspects of @trusted and @system, but this contract too.
            • Re: nogc... Meta via Digitalmars-d-announce
            • Re: nogc... Atila Neves via Digitalmars-d-announce
              • Re: ... Paolo Invernizzi via Digitalmars-d-announce
              • Re: ... Atila Neves via Digitalmars-d-announce
              • Re: ... Paolo Invernizzi via Digitalmars-d-announce
              • Re: ... ag0aep6g via Digitalmars-d-announce
              • Re: ... Atila Neves via Digitalmars-d-announce
              • Re: ... ag0aep6g via Digitalmars-d-announce
              • Re: ... Atila Neves via Digitalmars-d-announce
              • Re: ... ag0aep6g via Digitalmars-d-announce
              • Re: ... Valeriy Fedotov via Digitalmars-d-announce
              • Re: ... ag0aep6g via Digitalmars-d-announce
  • Re: nogc v0.5.0 - DIP1008 work... Mike Franklin via Digitalmars-d-announce

Reply via email to