try/catch idiom in std.datetime

Jonathan M Davis jmdavisProg at gmx.com
Wed Nov 20 22:35:18 PST 2013


On Wednesday, November 20, 2013 19:22:10 Walter Bright wrote:
> On 11/20/2013 12:23 PM, Jonathan M Davis wrote:
> > So, while some cases are clearly objectively bad (e.g. all of the code on
> > one line), I think that you're going to have a hard time arguing it
> > objectively in most cases - especially when it comes to legibility, since
> > different people find different styles to be more legible, and what's
> > more legible often comes down to what you're used to seeing rather than
> > anything particularly objective.
> Legibility can be objective, too.
> 
> For example, it is a fact that many fonts do not distinguish O and 0, l and
> 1. It is an objective fact that people have trouble distinguishing them.
> The JSF C++ coding standard, for example, prohibits using an "l" suffix on
> integral literals for that reason.
> 
> It's also an objective fact that people have trouble distinguishing:
> 
>      verylongisanidentifier
> 
> from:
> 
>      verulongsianidentifier
> 
> It's not just tomayto-tomahto. Human factors research shows that some
> designs are objectively better than others.

Definitely, but almost all arguments over coding style seem to be very 
subjective even when some people try and claim that some of the issues are 
objective. Most style choices which are objectively bad don't even ever get 
made precisely because they're objectively bad. There are of course 
exceptions, but I've rarely seen style arguments that are actually objective, 
and it's not uncommon to have people with drastically different opinions as to 
what looks good and who think that it should be obvious to everyone that what 
they think looks good looks good and that the other style looks horrible.

And I've run into plenty of cases where one developer thinks that a particular 
coding style is much easier to read, which is in complete contrast with what 
another developer thought was legible (how many parens to use and where being 
a prime example of that). So, it at least almost always seems like what's 
considered be a good, legible style is very subjective.

- Jonathan M Davis


More information about the Digitalmars-d mailing list