www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - getopt defaultGetoptPrinter is not safe. Is there a reason for that?

reply Markus <contact markus-lanner.com> writes:
Hi.

I'm a big fan of  safe code. But within my first 20 program lines 
I already run into problems:
Error:  safe function D main cannot call  system function 
std.getopt.defaultGetoptPrinter
https://dlang.org/phobos/std_getopt.html#.defaultGetoptPrinter
I wonder what's the reason for that?

Cheers
Markus
Aug 17 2018
parent reply Markus <contact markus-lanner.com> writes:
On Friday, 17 August 2018 at 08:09:52 UTC, Markus wrote:

 I wonder what's the reason for that?
I wonder why it's not at least trusted. Literally, can't I trust that method/function?
Aug 17 2018
parent rikki cattermole <rikki cattermole.co.nz> writes:
On 17/08/2018 8:32 PM, Markus wrote:
 On Friday, 17 August 2018 at 08:09:52 UTC, Markus wrote:
 
 I wonder what's the reason for that?
I wonder why it's not at least trusted. Literally, can't I trust that method/function?
It honestly looks like a simple case of nobody has yet bothered to do it. It should be a simple case as opening a PR and chucking safe on the function(s).
Aug 17 2018