On 2/2/18 4:29 AM, Seb wrote:
On Friday, 2 February 2018 at 08:34:32 UTC, Antonio Corbi wrote:
Wouldn't it be good to include a fix for errors like produced by
int.min assigned to a variable
(https://forum.dlang.org/post/p4l7kt$80d$1...@digitalmars.com) in a point
release like this?
No, while I understand that you would like this to be fixed, this change
might be disruptive - you never know on what weird behavior people rely.
Anything potentially breaking existing code can't be part of a patch
In some cases, yes, we need to have a deprecation period as people may
depend on the behavior.
In this case, however, the codegen is simply wrong. It can be fixed
immediately. I would hazard to guess that nobody is depending on int.min
being greater than 0.
Also AFAICT no one has submitted a PR to fix the issue you referenced,
so it's a hypothetical question (for now).
I would suggest to would-be fixers, just do the correct thing that may
be less performant, and we can worry about optimizing later (and add a
unit test of course!). There is nothing worse than a compiler that
doesn't emit the code you expect it to.