Time to move std.experimental.checkedint to std.checkedint ?
Steven Schveighoffer
schveiguy at gmail.com
Mon Mar 29 14:47:15 UTC 2021
On 3/24/21 10:57 AM, Q. Schroll wrote:
> On Wednesday, 24 March 2021 at 11:20:52 UTC, Berni44 wrote:
>> On Tuesday, 23 March 2021 at 21:22:18 UTC, Walter Bright wrote:
>>> It's been there long enough.
>>
>> Isn't that true meanwhile for everything in std.experimental? I ask,
>> because I've got the feeling, that std.experimental doesn't work as
>> expected. For me it looks more or less like an attic, where stuff is
>> put and then forgotten. Maybe the way we used for sumtype is the
>> better approach...
>
> I have no idea why std.experimental is a thing to begin with. It sounds
> like a bad idea and it turned out to be one. Moving stuff around in a
> standard library isn't without some disadvantages: The public import
> stays as an historic artifact or deprecation is needed, both things that
> should be avoided. There are cases where it's fine like splitting a
> module into a package.
It's there because we wanted a place for new parts of phobos to develop
without becoming set in stone. The reason it's called "std.experimental"
is to disclose explicitly that it is meant to be experimental, subject
to breaking changes. Otherwise you get things like javax.
In practice, it turned out not as helpful as originally planned, which
is why we haven't put anything new in it for a long long time. Take for
instance std.experimental.allocator. At one point, a fundamental design
change happened (which is perfectly allowed). But of course, code had
depended on it, and now was broken. So stdx.allocator was born (see
https://code.dlang.org/packages/stdx-allocator) to allow depending on
specific versions of std.experimental.allocator without having to freeze
yourself at a specific Phobos version.
It's important to note that std.experimental predates code.dlang.org,
which I think is the better way to develop libraries that might become
included into phobos (see for instance std.sumtype).
>
> Can std.experimental packages be removed without deprecation?
In a word, yes. It's experimental, anything is possible. I would
recommend we deprecate-remove everything in it into dub packages, or
promote them to full-fledged Phobos packages.
-Steve
More information about the Digitalmars-d
mailing list