Safe mode in D?

Maxim Fomin maxim at maxim-fomin.ru
Sat Oct 19 00:24:48 PDT 2013


On Saturday, 19 October 2013 at 06:54:32 UTC, Max Samukha wrote:
> On Friday, 18 October 2013 at 23:03:42 UTC, ProgrammingGhost 
> wrote:
>
>> Whats 'wrong' with this code?
>
> Nothing, that's the point. Just like with 
> __traits(getOverloads, this, "__ctor")[0](i).
>
> In my world, safety features of a language are meant to help a 
> fairly reasonable programmer avoid accidental mistakes. 
> Misusing reflection or C interface is not an accidental mistake.

Actual definition of safity in D is "Safe functions are functions 
that are statically checked to exhibit no possibility of 
undefined behavior. Undefined behavior is often used as a vector 
for malicious attacks. " I provided many cases where this does 
not happen.


More information about the Digitalmars-d mailing list