digitalmars.D.learn - how to enable safeD ? dmd.conf ? dmd switch ?
- someone (8/8) Jun 07 2021 https://dlang.org/articles/safed.html
- rikki cattermole (4/13) Jun 07 2021 SafeD is an old name given to the attributes @safe @trusted @system.
- someone (4/8) Jun 07 2021 So DMD now enforces it by default ? Will it complain if I make
- H. S. Teoh (5/15) Jun 07 2021 Annotate your functions with @safe.
- someone (4/5) Jun 07 2021 https://dlang.org/spec/function.html#function-safety
- Andrea Fontana (2/10) Jun 08 2021 Just mark main() function with @safe and you're done.
- someone (2/3) Jun 08 2021 Fine, thanks :) !
https://dlang.org/articles/safed.html https://dlang.org/dmd-linux.html#switches http://ddili.org/ders/d.en/functions_more.html Neither man dmd nor man dmd.conf appear to have a related/switch setting. Does it means safeD is achieved by placing safe attributes all over the place ? Or is it achieved by setting some global switch elsewhere ? Am I missing something ?
Jun 07 2021
On 08/06/2021 2:47 PM, someone wrote:https://dlang.org/articles/safed.html https://dlang.org/dmd-linux.html#switches http://ddili.org/ders/d.en/functions_more.html Neither man dmd nor man dmd.conf appear to have a related/switch setting. Does it means safeD is achieved by placing safe attributes all over the place ? Or is it achieved by setting some global switch elsewhere ? Am I missing something ?SafeD is an old name given to the attributes safe trusted system. There is no switch nor any special behavior now that it has long been added to mainline D.
Jun 07 2021
On Tuesday, 8 June 2021 at 02:59:28 UTC, rikki cattermole wrote:SafeD is an old name given to the attributes safe trusted system.I have the Alexandrescu's book on hand so that explains it.There is no switch nor any special behavior now that it has long been added to mainline D.So DMD now enforces it by default ? Will it complain if I make something out of the ordinary then ?
Jun 07 2021
On Tuesday, 8 June 2021 at 03:32:31 UTC, someone wrote:On Tuesday, 8 June 2021 at 02:59:28 UTC, rikki cattermole wrote:better read carefully how the attribute work, if you need aditional switches or anything, for example, if you want to use return scope parameter and make the compiler give a compiler error if you set this parameter to a variable outside the function's scope, you have to use -dip25 -dip1000 switchesSafeD is an old name given to the attributes safe trusted system.I have the Alexandrescu's book on hand so that explains it.There is no switch nor any special behavior now that it has long been added to mainline D.So DMD now enforces it by default ? Will it complain if I make something out of the ordinary then ?
Jun 07 2021
On Tuesday, 8 June 2021 at 03:54:47 UTC, Jack wrote:better read carefully how the attribute workGood advice. I think I am going too fast. Thank you :)
Jun 07 2021
On Tue, Jun 08, 2021 at 02:47:18AM +0000, someone via Digitalmars-d-learn wrote:https://dlang.org/articles/safed.html https://dlang.org/dmd-linux.html#switches http://ddili.org/ders/d.en/functions_more.html Neither man dmd nor man dmd.conf appear to have a related/switch setting. Does it means safeD is achieved by placing safe attributes all over the place ? Or is it achieved by setting some global switch elsewhere ? Am I missing something ?Annotate your functions with safe. T -- Those who don't understand D are condemned to reinvent it, poorly. -- Daniel N
Jun 07 2021
On Tuesday, 8 June 2021 at 04:24:38 UTC, H. S. Teoh wrote:Annotate your functions with safe.https://dlang.org/spec/function.html#function-safety Best Practices: Mark as many functions safe as practical. ACK
Jun 07 2021
On Tuesday, 8 June 2021 at 02:47:18 UTC, someone wrote:https://dlang.org/articles/safed.html https://dlang.org/dmd-linux.html#switches http://ddili.org/ders/d.en/functions_more.html Neither man dmd nor man dmd.conf appear to have a related/switch setting. Does it means safeD is achieved by placing safe attributes all over the place ? Or is it achieved by setting some global switch elsewhere ? Am I missing something ?Just mark main() function with safe and you're done.
Jun 08 2021
On Tuesday, 8 June 2021 at 07:46:43 UTC, Andrea Fontana wrote:Just mark main() function with safe and you're done.Fine, thanks :) !
Jun 08 2021