Thread overview
Making DIP25 the default
Oct 16, 2016
Dicebot
Oct 19, 2016
Martin Nowak
Oct 20, 2016
Dicebot
October 16, 2016
It has been a very long time since -dip25 CLI switch was introduced. More importantly, it is a requirement for coming DIP1000, which means that turning it into normal behavior must be prioritized.

I have quickly checked current DMD sources and this seems to be the only place affected by the switch:

```
  // escape.d
  /* Check for returning a ref variable by 'ref', but should be 'return ref'
   * Infer the addition of 'return', or set result to be the offending
expression.
   */
  if (global.params.useDIP25 &&
     (v.storage_class & (STCref | STCout)) &&
    !(v.storage_class & (STCreturn | STCforeach)))
  {
```

Looks like it is relatively simple to enable that block unconditionally and turn errors inside it into deprecations.

@Martin would be OK with adding this change to coming release? That way we will have more time to fix any issues before DIP1000 comes into play.



October 19, 2016
On Sunday, 16 October 2016 at 13:23:56 UTC, Dicebot wrote:
> @Martin would be OK with adding this change to coming release? That way we will have more time to fix any issues before DIP1000 comes into play.

It's a bit late for the current release, we're already 2 weeks into beta testing and 1 week behind our schedule.
If you meant 2.073 I think that might be fine, but I haven't yet catched up with all the scope/RC plans, so I'm unsure about the bigger role of DIP25.
October 20, 2016
On 10/19/2016 08:28 PM, Martin Nowak wrote:
> On Sunday, 16 October 2016 at 13:23:56 UTC, Dicebot wrote:
>> @Martin would be OK with adding this change to coming release? That way we will have more time to fix any issues before DIP1000 comes into play.
> 
> It's a bit late for the current release, we're already 2 weeks into beta
> testing and 1 week behind our schedule.
> If you meant 2.073 I think that might be fine,

No, I was thinking about 2.072 because Walter will certainly want DIP1000 work to come in 2.073 and that includes DIP25 - would be nice to get it one release earlier.

If you feel it will compromise coming release too much, I'll make required change instead in master as soon as 2.072 is finally released and merged back.

> so I'm unsure about the bigger role of
> DIP25.

It is very simple - DIP1000 implementation assumes -dip25 is active and enables it automatically.