Is phobos too fluffy?

Adam D. Ruppe destructionator at gmail.com
Sun Sep 20 22:09:42 UTC 2020


On Sunday, 20 September 2020 at 21:42:54 UTC, mate wrote:
> Thanks. So it does look like you have an implicit soft line 
> length limit for code, but not documentation.

Well, it isn't so much a limit as just a lack of demand or some 
other kind of natural traffic calming.

This makes me think about cities. Locally, the city planning 
department has been doing a "road diet". They are changing the 
designs of roads to make them narrower, planting more trees, and 
other changes that just generally make them more difficult to 
navigate in an effort to make them safer.

It might sound weird that a strait path with a narrow gate would 
make the road safer, but it has been proven to have that positive 
safety effect because it makes drivers more likely to naturally 
slow down and pay attention. Whereas a posted speed limit on a 
wide, straight road is just a suggestion you only really think 
about when you see a police car, the designed-in "speed limit" 
created by trees, curves, narrowness, obstacles, etc. are 
something you think about for pure self-preservation if nothing 
else. At that point, you don't really need a legislated/posted 
speed limit at all (though you might keep one anyway just in case 
there is a particularly reckless or inexperienced driver who 
needs the tip, it would rarely actually need active enforcement).


Well, to bring this back to code, excessively long lines are 
already disincentivized by design. There's really no need in the 
majority of cases, and when there is, the natural benefits of 
two-dimensional layout (and the fact so many programming tools 
are line-based anyway) create an incentive for the author - for 
their own self-interested benefit - to break it up as 
appropriate. They don't have to be TOLD to by some kind of 
rubocop.

And if they choose to not break it up, it is probably because 
they judged it to not actually be a benefit in this case and 
someone complaining about the line length is more likely to be 
seen as patronizing than helpful.


More information about the Digitalmars-d mailing list