Justwerk compiler flag

Luna luna at foxgirls.gay
Sat Jul 19 20:50:31 UTC 2025


On Friday, 18 July 2025 at 16:43:19 UTC, Ogi wrote:
> On Thursday, 17 July 2025 at 18:05:08 UTC, Dukc wrote:
>> In the case of `@safe` and `private`, can't you simply not use 
>> them when they get in the way? Mark your function `@system`, 
>> and bye bye safety checks.
>
> Imagine you want to use a library that have this function:
>
> ```D
> void coolFunction(void function() @nogc nothrow @safe pure 
> callback) @nogc nothrow @safe pure
> ```
>
> Now you are forced to satisfy all these attributes, even if you 
> don’t care.

Except you can cast function pointers to less-qualified function 
pointers.
The big issue with doing this, for example with nothrow, is that 
depending on the platform the code generation will differ in a 
way that where if your code throws something anyways; it will 
cause your application to segfault instead as it corrupts the 
stack.


More information about the dip.ideas mailing list