Thread overview
2.079 semantic change needs to be marked in changelog
Jul 02, 2018
Johan Engelen
Jul 03, 2018
Walter Bright
Jul 05, 2018
Johan Engelen
July 02, 2018
The changelog of 2.079 says:
"
3. Function parameters with default values are now allowed after variadic template parameters
Function parameters with default values are now allowed after variadic template parameters and when IFTI is used, always take their default values.
...
"

However, parameters with default values were already allowed after variadic template parameters. And the 2.079-change of behavior results in compile errors (in the best case), but may also lead to bad runtime behavior of previously working code. I hope the change was made knowingly that it was a semantic change, instead of an addition to the semantics...

Simple test case:
```
import std.stdio;

void bar(Args...)(Args _args, int timeout = 0) {
    pragma(msg, typeof(_args));
    writeln(_args, timeout);
}

void main() {
    bar("a", "b", 2); // used to print "ab2", but since 2.079 prints "ab20"
}
```

Semantic changes like this need to be very clearly marked in the changelog. Updating the compiler on a commercial codebase is already enough of an adventure, no need to add extra uncertainties.

Please fix the changelog.
Thanks,
  Johan


July 02, 2018
Please post bug reports (including documentation problems) on bugzilla!
July 05, 2018
On Tuesday, 3 July 2018 at 01:07:53 UTC, Walter Bright wrote:
> Please post bug reports (including documentation problems) on bugzilla!

https://issues.dlang.org/show_bug.cgi?id=19057