A few holes (imho) in the ecosystem of libraries

Guillaume Piolat first.last at spam.org
Mon May 15 14:23:24 UTC 2023


On Monday, 15 May 2023 at 14:04:39 UTC, Andrew wrote:
>
> if you could list on that thread some more examples of what you 
> need from a binary IO library.

On the top of my head

- my first post details what I see as must haves, but that's just 
my opinion and obviously maintainer propose one's design.

- if you reserve common works like `read`/`write` as identifier 
for your library, it **will** be annoying downstream because it 
clashes with other careless namespace landgrab from Phobos. Like 
std.file.read, std.file.write std.stdio.read, std.stdio.write. 
This is what happens in practice, and the simple fact you use 
very common words for not-trivial operation is a big deterrent. I 
had endless problems with Phobos min/max, and ended avoiding 
those functions altogether. And "read" or "write" do not say at 
all what your function does! This kind of naming end up worse 
than C library names with prefixes.
Also templated libraries often have lack of separation between 
API and internals, this is poison to versionning.





More information about the Digitalmars-d mailing list