Reddit: SafeD - The Safe Subset of D

Georg Wrede georg at nospam.org
Tue Mar 25 18:01:17 PDT 2008


Walter Bright wrote:
> I suspect that having a granular level of specifying safe/unsafe is the 
> wrong approach. Doing it at the module level is easy to understand, and 
> has the side effect of encouraging better modularization of safe/unsafe 
> code.

That would mean that modules in Phobos would be either Safe or Unsafe.

Or[/and] that some modules would have to have two versions, one Safe and 
the other Unsafe.

More practical would be (especially if the compiler has access to 
info/hints to the safety of individual functions) to have it per function.

Then the compiler could discriminate, depending on if the user had used 
the -Safe switch or not.

Personally, I'd advocate having Safety on App Level. Either an app is 
SafeD compliant, or not. I have a hard time seeing anything in between.



More information about the Digitalmars-d-announce mailing list