Blog Post: Beating std::visit Without Really Trying
Seb
seb at wilzba.ch
Sun Oct 6 03:47:25 UTC 2019
On Sunday, 6 October 2019 at 02:33:15 UTC, Walter Bright wrote:
> On 10/5/2019 6:58 AM, Seb wrote:
>> Phobos is essentially dead/frozen (feature-wise).
> I beg to disagree. A couple cases in point:
>
> https://github.com/dlang/phobos/pull/7211
>
> which is a re-imagining, rethinking of hexString.
I'm sorry, my choice of words wasn't wise (and I certainly didn't
mean it in a negative way). Phobos is amazing and stable, but
exactly because of these attributes there isn't much active
development happening. Stability implies no breaking changes
which is **very very good** because it allows the ecosystem to
thrive (and not break builds because Algebraic was swapped
against SumType).
Below I have listed a summary of all announced changes in Phobos
since the beginning of this year (six releases, 2.088 - 2.083).
This lists only the announced changes (and there are more bug
fixes), but in total we're looking at one new function
(getAvailableDiskSpace), two new overloads (schwarzSort,
unpredictableSeed) over these six releases. That's what I was
referring to.
For comparison: in the meantime about 200 new Dub packages have
been added [1, 2] and in total about 600 Dub packages have been
updated [3].
2.088:
- std.array.Appender and RefAppender: use .opSlice() instead of
data()
- ErrnoException.errno is now nothrow pure @nogc @safe
- Nullable alias get this has been deprecated
- Added the std.file.getAvailableDiskSpace functionality.
- Allow std.json to overlook trailing comma
2.087:
- Added a table of control characters in ASCII table
- Count processors via sched_getaffinity on Linux
- Add overload std.algorithm.sorting.schwartzSort!(alias
transform, SwapStrategy ss, R)
- Phobos is now compiled with -preview=dip1000
2.086:
- Fixed comparison bug in
std.algorithm.comparison.levenshteinDistance
- std.experimental.all has been moved to std
2.085: (no changes)
2.084:
- Add overload std.random.unpredictableSeed!UIntType
2.083: (no changes)
See more at [4].
[1]
https://web.archive.org/web/20181229043818/http://code.dlang.org/
[2] https://code.dlang.org/
[3]
https://code.dlang.org/?sort=updated&category=&skip=500&limit=100
[4] https://dlang.org/changelog/index.html
> and:
>
> https://github.com/dlang/phobos/pull/7130
> https://github.com/dlang/phobos/pull/7144
>
> both of which work to remove autodecode from Phobos. 7130 in
> particular can use some help with anyone who wants to help
> drive this forward.
I'm sorry and while I like this effort, I don't expect it to help
because it does break the world.
AFAICT the only way to avoid breaking the world when removing
autodecode is to ship a new/different version of Phobos
_together_ with the current one, s.t. it can be opted-in by users.
Anyhow, I think Andrei summarized it better a few months ago:
> The time is ripe for std.v2
> [https://forum.dlang.org/post/q7j3s0$15n7$1@digitalmars.com]
My earlier post tried to point out that SumType is an excellent
candidate for v2.
More information about the Digitalmars-d-announce
mailing list