ImportC and nothrow/@nogc?

Timon Gehr timon.gehr at gmx.ch
Mon Aug 26 18:00:46 UTC 2024


On 8/26/24 03:16, Manu wrote:
> On Mon, 26 Aug 2024, 07:56 Timon Gehr via Digitalmars-d, <digitalmars- 
> d at puremagic.com <mailto:digitalmars-d at puremagic.com>> wrote:
> 
>     On 8/25/24 13:06, Dom DiSc wrote:
>      >
>      > But I fully agree, this should be replaced by true trusted
>     blocks, the
>      > sooner the better.
> 
>     You cannot have a "trusted block". It just does not work. The interface
>     to any trusted thing has to be clearly delineated.
> 
> 
> Well it obviously does work in some sense, because it's the de facto 
> standard that people generally expect in numerous languages.
> ...

No, it's laid out differently.

> People are going to have it one way or another; whether it's a 
> ridiculous hack like `()@trusted { ... }();` or otherwise. It's what 
> other languages with this sort of thing do.
> ...

No, e.g. Rust just does not distinguish trusted and untrusted safe 
functions.

> We don't have a better offering to motivate people to deviate from their 
> patterns.
> 
> Resisting that degrades D.
> 

It should not be called "trusted" then.

Fundamentally, I agree on the substance (though probably, even better 
designs are possible). However, let's not invent another idiosyncratic 
keyword now.


More information about the Digitalmars-d mailing list