Is phobos too fluffy?

Abdulhaq alynch4047 at gmail.com
Mon Sep 21 10:38:57 UTC 2020


On Thursday, 17 September 2020 at 18:15:32 UTC, Andrei 
Alexandrescu wrote:
> On 9/17/20 1:49 PM, jmh530 wrote:
>> On Thursday, 17 September 2020 at 17:16:42 UTC, Andrei 
>> Alexandrescu wrote:
>>> [snip]
>
> 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.

A general comment on this thread. Each of us has his preferred 
code style guidelines (standards are great, everyone should have 
their own standards!). What we have done is we have trained our 
visual system / brain to easily pick out the semantically 
important information based on the styling/layout of the code. 
This leaves us feeling good or bad about certain formatting 
styles, depending on how well your trained visual system/rules 
can cooperate with the the style of the code at hand. Then we say 
that python-style indents stink, K&R brackets are the only way to 
go etc., etc.

In reality we need to agree to a single standard for D code and 
everyone has to stick to it whether it panders to the style of 
their choice or not. After a month or two our visual cortex / D 
brain will accommodate the new style and all will be well again 
in the world.


More information about the Digitalmars-d mailing list