Generality creep

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Mar 20 18:57:53 UTC 2019


On 3/19/19 9:04 AM, Vladimir Panteleev wrote:
> On Tuesday, 19 March 2019 at 02:52:34 UTC, Andrei Alexandrescu wrote:
>> And why was Phobos under the obligation to cater for such a type and 
>> its tenuous relationship to a range?
> 
> There's two paths to investigate this:
> 
> 1. Use git blame to find the commit when it was introduced, and follow 
> the thread to the pull request, Bugzilla issue, etc.
> 
> 2. Open a draft PR with a fix, and see what breaks (both within D 
> repositories i.e. auto-tester, and in the D ecosystem at large i.e. the 
> project tester).

Thanks. I'm less preoccupied with figuring out who wrote that code, as 
with addressing the systemic matter. My working hypothesis is a (milder) 
form of "the road to hell is paved with good intentions" - some arguably 
undesirable generality has accumulated slowly as many contributors with 
varying design sensibilities operated under the vague desideratum that 
more generality is better, ran into a variety of complex cases, and 
contributed their solution to the standard library.

I got word a similar phenomenon is at work in Scala - the language and 
its libraries are very powerful, but the boundaries of power are fuzzy 
and some users are in a continuous state of frustration that some 
constructs that ought to work do not due to byzantine limitations.

At any rate, there seems to be some good opportunity to significantly 
simplifying the standard library by dropping some of the more obscure 
supported cases.


More information about the Digitalmars-d mailing list