try/catch idiom in std.datetime

Jonathan M Davis jmdavisProg at gmx.com
Wed Nov 20 12:23:59 PST 2013


On Wednesday, November 20, 2013 12:06:04 Andrei Alexandrescu wrote:
> What I meant is there are consistent styles that are objectively worse.
> Consistency is necessary but not sufficient.

I agree, but you do come across sometimes as seeming to think that some styles 
are objectively worse when plenty of other folks would disagree with you (e.g. 
with regards to how much vertical whitespace is reasonable). I think that in 
most cases, style ends up being very subjective and not objective at all.

IIRC, Walter linked to a blog post a few months back about someone talking 
about what good coding style looked like, and they were talking about the code 
for Doom 3 and how beautiful it was, and yet when they showed what it looked 
like, many people thought that the coding style was absolutely horrible. I 
think that it's quite clear that what people consider to look good in terms of 
coding style varies quite a bit.

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.

- Jonathan M Davis


More information about the Digitalmars-d mailing list