Is phobos too fluffy?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.com
Thu Sep 17 18:15:32 UTC 2020


On 9/17/20 1:49 PM, jmh530 wrote:
> On Thursday, 17 September 2020 at 17:16:42 UTC, Andrei Alexandrescu wrote:
>> [snip]
>>
>> This is exclusively about readability. Too much fluff means too little 
>> context in front of you.
> 
> When I looked at some of those examples above, I agree that some are 
> extraneous (which should get flagged by the autotester)...but I almost 
> always put an empty line after imports.

I was all in favor of that, until I had to refactor a dozen two-liners 
consisting of... let me paste some code:

auto put(ref GGPlotD gg, GeomBar def) {
     import ggplot.backend.ggplot.geom_bar : geomBar;

     return gg.put(geomBar(def));
}

And so it goes for pages.

There is something to be said about a guideline versus a mindless dogma. 
Things like enum strings, each, and autodecoding are more of the latter.


More information about the Digitalmars-d mailing list