try/catch idiom in std.datetime

xenon325 anm at programmer.net
Wed Nov 20 20:51:37 PST 2013


On Thursday, 21 November 2013 at 02:02:08 UTC, Dicebot wrote:
> On Thursday, 21 November 2013 at 01:45:46 UTC, Andrei 
> Alexandrescu wrote:
>> In this context "objectively worse" means "all reasonable 
>> people would say it's worse".
>>
>> Andrei

A sample of code from my very first job (needless to say that 
wasn't software company):

if (...) statements1; else
statements2;

yes, not indentation and it was used pretty consistently, and I'm 
not kidding!
To make things worse, in the code fragment I was debugging 
`statements1` exceeded screen width, so I have not seen `else`.

It was on my very first day, and after discovering this nightmare 
I spent all the rest of the day searching for code pretty-printer.
At that moment I didn't even know how these class of programs 
called or if they exist at all, but debugging code written like 
that would be unbearable.

Now, Michael, please, go and show me *a single* experienced 
programmer who wouldn't call this coding style a disaster. 
DISASTER.

I think I understand your stance - adherence to scientific method 
etc and that's great, but there is a limit to it.

(Once again, I'm not exaggerating at all. There were other "nice" 
things there, like behemoth method 8k lines long, code 
duplication all over the place, sometimes tens times)


More information about the Digitalmars-d mailing list