-preview=safer for D

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Jan 3 10:19:21 UTC 2025


On Saturday, 14 December 2024 at 08:46:35 UTC, Walter Bright 
wrote:
> Now that this has been merged into master, what are your 
> reactions?

I posted this same question in the announcement thread, but I'm 
curious how we're going to make this work with dependencies.

I can't enable `-preview=safer` only on my own code. It applies 
transitively to everything that's being imported.

It would be useful to be able to limit this flag to specific 
packages. So that I can enable it for only the code I'm in 
control over. But that could complicate the compiler, I 
understand.

Right now this feature is pretty much dead in the water for me if 
I can't compile my own code with the feature on because some 
dependency is not `-preview=safer` compatible.


More information about the Digitalmars-d mailing list