Isn't `each` too much of a good thing?

data pulverizer data.pulverizer at gmail.com
Sun Sep 20 12:08:05 UTC 2020


On Thursday, 17 September 2020 at 16:18:18 UTC, Andrei 
Alexandrescu wrote:
> The implementation of each in std.algorithm.iteration sets out 
> a lofty goal: whatever can be iterated, must be iterated with 
> each.
>
> Problem is, there are way too many things that can be iterated 
> in D and too many ways to iterate them. This leads to a 
> veritable gallop of checks:
>
>  [...SNIP...]
>
> Too much!
>

Agree! There is a greater sense in which too much effort is 
placed on some end-user stuff within the base language. An 
example is the `std.csv` package, even Julia - a language 
specifically designed for scientific/technical/data science 
computing does not have a csv reader in its standard library (it 
has DelimitedFiles which does something different - single type 
file read), instead it has a separate CSV package. The D language 
allows you to parse a typical XSV file very easily, so instead of 
aiming specifically at CSV files, just have better curated and 
documented a general I/O library.

I think a lot of people attracted to D are looking to fish, not 
to be given fish. If the D community has a smaller standard 
library footprint, hiving off certain things to DUB, it should 
free up resources for better curation and documentation.




More information about the Digitalmars-d mailing list