Clojure and Pull Request Controversy

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Nov 30 19:51:07 UTC 2018


On Fri, Nov 30, 2018 at 02:08:28PM -0500, Steven Schveighoffer via Digitalmars-d wrote:
[...]
> There are going to be many cases I think where it just works, no
> matter what you care about auto-decoding.
> 
> For example searching for a string in a string doesn't matter whether
> the string uses auto-decoding or not.
> 
> For low-level code, you need to pick autodecoding or not autodecoding,
> and we need a deprecation period, Like Nick suggested.
[...]
> However, the end result is after the deprecation period, things can go
> back to being reasonable, and autodecoding-free.
> 
> We will see how bad it is, once it's tried. I'm hoping not very bad.
[...]

There have been offers to run an experiment on various CI's and
code.dlang.org, which will give us concrete data on just how bad this
will be.  Care to throw together a Phobos PR that can be used as a
yardstick?

Basically, I can see multiple runs of the experiment, i.e., PRs that do
slightly different things, to probe various aspects of this:

1) Silent breakage: just turn off autodecoding silently, run the CI's,
see how many unittests break. (Hopefully not zero! Otherwise that means
most D code sux. :D)  Examine breakages to assess ease level of fix.
E.g., if we just have to add .byCodeUnit or .byCodePoint, it would count
as an easy fix, whereas if the algorithm needs to be rewritten, then
it's a complex fix.  Tally both kinds of fixes and see how the numbers
compare.

2) Deprecation breakage: add a deprecation to all entry points to
autodecoding. See how much code breaks. Examine breakages to assess ease
of fix. Should be similar to silent breakage. If numbers are much
bigger, that means most D code sux. :D

3) Make strings non-ranges: this will probably basically break
*everything*.  Subtract the numbers from (1) and (2) to get an idea of
how much extra work will be required during the deprecation period.
Essentially, this tells us how much work it will be to add .byCodeUnit /
.byCodePoint to every iteration over string.  Expect pretty bad numbers
here. (But if we get a pleasant surprise here, this may be an indication
that removing autodecoding isn't as fearful as we thought!)

Of course, all of the above depends on a base PR that fixes Phobos to be
passing CI tests first.  Alternatively, we could perform the above steps
on Phobos first, to assess how much work it will be to make Phobos
autodecoding-free, before trying it on user code.


T

-- 
Life begins when you can spend your spare time programming instead of watching television. -- Cal Keegan


More information about the Digitalmars-d mailing list