It turns out it's quite hard to have @safe pure nothrow functions. Oh, and const.

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 12 02:53:44 PDT 2014


This happens to me all the time. I write a function, stick the 
aforementioned attributes on as a default then let the compiler 
tell me when I can't.

That happens a lot more often than I thought it would. Pretty 
much anytime I call a Phobos function I have to remove at least 
one of them but usually all three.

Is it similar for everyone else? Is it considered a problem?

The other thing is I frequently have to "unconstify" my variables 
to get them accepted by Phobos functions as well.

I should've kept examples but I didn't, this is all from what I 
remember happening in the last week or so.

Atila


More information about the Digitalmars-d mailing list