Manu's `shared` vs the @trusted promise

Dukc ajieskola at gmail.com
Tue Oct 23 10:23:48 UTC 2018


On Monday, 22 October 2018 at 14:23:09 UTC, ag0aep6g wrote:
> Arrays are a language builtin. As far as I'm aware, there isn't 
> actually an struct defined in DRuntime for arrays. But maybe 
> I'm wrong. If there is, and if it uses a plain size_t for the 
> length member, then it is breaking the strong @trusted promise, 
> yes.

This does not only apply to builtin arrays. It also applies to 
RAII or refcounted memory resources made safe with DIP1000

> But having existing exceptions to the rule doesn't mean that 
> the rule is void.

Perhaps you're right. But IMO the proposed struct would 
definitely be low-level and fundamental enough to warrant an 
exception to that rule.

Note, I'm not saying I support what Manu proposed, just that the 
argument about strong @trusted should not stop the proposal if we 
otherwise like it.




More information about the Digitalmars-d mailing list