DIP 1028 dub packages test package "sml"

Jon Degenhardt jond at noreply.com
Sun Jan 5 01:13:14 UTC 2020

On Sunday, 5 January 2020 at 00:34:42 UTC, ag0aep6g wrote:
> On 04.01.20 23:43, Jon Degenhardt wrote:
>> Looking at the tsv-utils error log, an issue that will affect 
>> applications more often than libraries is that uses of the 
>> std.getopt package are normally @system. That's because getopt 
>> assumes the caller will pass the addresses of variables. If 
>> the variable is local, the compilation will fail in @safe 
>> code. The code will typically be "safe" in that these 
>> references are not leaving the caller's scope, but the 
>> compiler still rejects the code in @safe mode.
> With DIP 1000, that should work. But it looks like std.getopt 
> needs a little push.
> An attempt: https://github.com/dlang/phobos/pull/7344

Thanks for taking a look at this.

Does this mean DIP 1000 modifies the rule against taking the 
address of local variables in @safe functions? I did not realize 
this. Is there documentation somewhere describing the DIP 1000 
rules for @safe functions? It's hard to tell from the DIP 1000 
doc, and the rationale for "Superseded" status indicates that the 
implementation doesn't match the text of the DIP.

More information about the Digitalmars-d mailing list