-dip25 switch: time to make it always on?

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 1 18:28:58 PDT 2016


On Wednesday, June 29, 2016 02:40:45 Walter Bright via Digitalmars-d wrote:
> It was added for 2.067 back in March of 2015:
>
> https://dlang.org/changelog/2.067.0.html
>
> It's been a strong success. Time to make it the default instead of enabled
> by a switch?

Well, I don't know how you can really tell whether it's been a success or
not. The only real evidence we have has to do with druntime, Phobos, and
maybe dmd - which certainly isn't nothing, but we really don't know how much
anyone has been using it. I suspect that almost no one has been. And if we
want to test it more globally, we're pretty much going to have to make it
the default (presumably by initially making it just print warning messages
which aren't affected by -w so as to avoid breaking code) and see what
happens. I certainly wouldn't suggest just making what -dip25 does suddenly
apply to everyone with no transition period.

That being said, I think that we need to be very sure that this is where we
want to go, and there always seems to have been a fair bit of disagreement
over that. Personally, I don't know. One big problem I see is that having an
attribute that you have to use in @safe code but not in other code really
does not play well with attribute inference, and you were talking about
making attribute inference even more widespread as part of the ref-counting
improvements.

And while I know that there are not a lot of open bugs related to -dip25, it
didn't exactly make me feel confident in the implementation, when I played
around with it a few minutes ago and hit a bug right away:

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

I honestly expect that almost no one has been using -dip25 (I certainly
haven't), and I think that saying that it's been a success is overstating
things considerably. If we want to see how well it works, we're really going
to need to make it the default behavior (presumably not as an error to begin
with), though obviously, that's going to be a problem if we then decide that
it was a mistake. :|

I think that dip25 may very well be the right way to go, but I also fear
that it's too narrow to really get us what we want - similar to how inout
helps with certain things but doesn't really get us what we want because
it's too narrow. So, I'm not opposed to moving forward with it, but I'm not
at all confident that it's the right choice.

- Jonathan M Davis



More information about the Digitalmars-d mailing list