July 05

On Saturday, 13 May 2023 at 15:58:12 UTC, ryuukk_ wrote:

>
  • better enums

  • tagged union

  • pattern matching

  • async

  • nullable

  • tuple/multiple return (deconstruction)

  • allocators (don't do them as classes/interface for the love of god)

  • implement GC as an allocator

This is a nice list, however I'd like to point out that not all of these need to be language features.
Nullable already exists in Phobos: https://dlang.org/library/std/typecons/nullable.html
You might say it should be a language feature, but I nullable value-types are a bit weird—they can be a value that isn't a value.
Pattern matching can be done in various ways, and the same to some extent with tuples.

Perhaps a fork of Phobos that's more community-driven would be good for the language?

July 05

On Wednesday, 5 July 2023 at 20:03:26 UTC, IchorDev wrote:

>

Perhaps a fork of Phobos that's more community-driven would be good for the language?

Why not just improve Phobos itself? Make PRs to add new modules to std.experimental, announce them here and elsewhere on the web, and get the community to support it.

July 06

On Wednesday, 5 July 2023 at 21:50:37 UTC, Andrew wrote:

>

Why not just improve Phobos itself? Make PRs to add new modules to std.experimental, announce them here and elsewhere on the web, and get the community to support it.

Earlier in this thread it was pointed out that it's too arbitrary whether new modules will get accepted into std.experimental or not, therefore a fork that's more open to community contributions (whether good or bad), would be of value. As it is, some of Phobos is really great, some of it could do with more nothrow/custom allocator alternatives or a nicer API that clashes with itself less often, and some of it is just horrid.

P.S. Who chose this silly name "std.experimental"? It might as well be "std.nonstandard".

July 06

On 7/6/23 12:16 AM, IchorDev wrote:

>

On Wednesday, 5 July 2023 at 21:50:37 UTC, Andrew wrote:

>

Why not just improve Phobos itself? Make PRs to add new modules to std.experimental, announce them here and elsewhere on the web, and get the community to support it.

Earlier in this thread it was pointed out that it's too arbitrary whether new modules will get accepted into std.experimental or not, therefore a fork that's more open to community contributions (whether good or bad), would be of value. As it is, some of Phobos is really great, some of it could do with more nothrow/custom allocator alternatives or a nicer API that clashes with itself less often, and some of it is just horrid.

Yeah, we are better off going the std.sumtype route -- release on dub, and then incorporate into Phobos if desired.

>

P.S. Who chose this silly name "std.experimental"? It might as well be "std.nonstandard".

It's purposely unattractive. We learned from javax of Java. It was supposed to be an "experimental" package, but people complained about the possibility of moving things into java so much that they had to leave packages there.

So we wanted to be very clear that packages in that branch of phobos are unstable, and could be removed/moved at any time. Use at your own risk.

-Steve

1 2 3 4
Next ›   Last »