Thread overview
getopt defaultGetoptPrinter is not safe. Is there a reason for that?
Aug 17, 2018
Markus
Aug 17, 2018
Markus
Aug 17, 2018
rikki cattermole
August 17, 2018
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
August 17, 2018
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?
August 17, 2018
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).