Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on D’s Newfangled Name Mangling. Parent comment
If you wrote every method using the @safe flag, you'd be forced to write a memory-safe program. Eg:
void main() @safe { int everything = 42; int* theAnswer = &a; int* earth = theAnswer * 2; // Won't compile. }
There are no comments on this comment yet.
If you wrote every method using the @safe flag, you'd be forced to write a memory-safe program. Eg:
With no flag or @system, safety is not ensured. Using @trusted will allow a function to be called, safe or not, from other safe functions ending the safety. But by design @safe functions can only call other @safe functions.