try/catch idiom in std.datetime

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Nov 19 07:01:53 PST 2013


On 11/18/13 11:30 PM, Jacob Carlborg wrote:
> On 2013-11-18 23:33, Andrei Alexandrescu wrote:
>
>> So that would be two empty lines between statements :o). Anyhow,
>> assuming you only meant one, that would be excessive if done for _all_
>> statements (i.e. everything ending with a semicolon). It would make code
>> look like a doc printed by someone who didn't know how to turn double
>> spacing off.
>
> I don't agree. And not having any empty newlines in the code would be
> like reading a text without paragraphs, as I've already said.
>
> Instead, take a look at some code I've written and you're free to
> thinking whatever you like, but I like that style.
>
> https://github.com/jacob-carlborg/dstep/blob/master/dstep/translator/Translator.d

That doesn't have an empty line after each statement.

Andrei



More information about the Digitalmars-d mailing list