Why Phobos is cool

Petar Petar
Thu Jun 25 14:27:02 UTC 2020


On Thursday, 25 June 2020 at 12:13:21 UTC, Paolo Invernizzi wrote:
>
> I know that we are quite few on this side, but IMHO a well 
> shaped standard library has advantages over a sparse ecosystem 
> of independent library ...

Who says that this is a binary choice? And also, the way you 
fraise it it's obvious that say Flutter is better choice than 
React as everything is very tightly integrated and you could 
build your whole app without reaching for third-party code. Also, 
it's obvious that in terms of trust, it's better to rely on the 
diligence of the upsteam development team, than random strangers 
from the internet.

But what if 90% of the code my team needs has no place in Phobos? 
We already have to rely heavily on third-party packages. Yes 
there are a lot of risks and we try to be careful, but we have no 
other choice. We could spend years reiventing the wheel 
(high-quality code that already exists in other languages), or we 
could focus on delivering products to our users based on the 
already existing ecosystem in other languages. Well, a choice 
would exist if we had an unlimited budget, but given that we're 
not as lucky, we can only use other languages for our projects 
currently.

Technically, phobos is actually already on Dub 
(https://code.dlang.org/packages/phobos), so in the future 
nothing could prevent you to continue using it, but you would 
just get it from there and not from the compiler distribution 
archive. It's the same code, made by the same people, just with a 
different distribution model.

The way I see things is that we as a community need to focus on a 
vetted, well shaped collection of libraries.
We need to have process where third-party libraries are able to 
gain broader support and join dlang-community. Also we need 
dlang-community to have a healthy number of people who actually 
maintain the code.
We need the leadership to realize that investing just in dmd, 
druntime and phobos is necessary, but very insufficient.
W&A need to stop pretending that Dub doesn't exist. I feel that 
unless we embrace using code.dlang.org as method of distribution 
of everything that's currently part of the compiler archive, 
Dub's limitations will never be addressed and from that the 
broader community will suffer.

> Anyway, if we can, we try to stick with Phobos, as long as we 
> don't have a particular problem to solve that needs an external 
> library: recent example, Martin std.io or SumType instead of 
> std.variant ...

See, some of the problems in Phobos already have a good solution. 
The problem that we need to address is the trust.
The more high-quality and well-maintained libraries there are, 
the less cautious one would need to be before reaching to 
code.dlang.org.



More information about the Digitalmars-d mailing list