try/catch idiom in std.datetime

growler growlercab at gmail.com
Tue Nov 19 17:36:14 PST 2013


On Wednesday, 20 November 2013 at 01:30:18 UTC, John J wrote:
> On 11/19/2013 04:21 PM, Andrei Alexandrescu wrote:
>> On 11/19/13 12:17 PM, Jacob Carlborg wrote:
>>> On 2013-11-19 19:29, Andrei Alexandrescu wrote:
>>>
>>>> That's not an expression, it's a statement - more precisely 
>>>> an
>>>> expression statement. (The semicolon makes it so.) By the 
>>>> rules you
>>>> incorrectly stated, there should be an empty line after it.
>>>
>>> I'm sorry for not know every minor detail of the language.
>>
>> It's not a minor detail. Besides, people took time to explain 
>> this to
>> you, and the right response is to integrate that information, 
>> not to
>> demean it.
>>
>>>> I'll allow myself a piece of advice - the density of e.g.
>>>> https://github.com/jacob-carlborg/dstep/blob/master/dstep/translator/Translator.d#L251
>>>>
>>>>
>>>> is low enough to make it career limiting. You'd do good to 
>>>> change your
>>>> style.
>>>
>>> Are you serious? Anyone caring about that doesn't know what 
>>> he/she is
>>> doing.
>>
>> That's exactly my point. The matter of fact is, in a setting 
>> where
>> people are paid to write code, this kind of minor issue would 
>> be settled
>> around the first week since hiring. At Facebook for example 
>> you'd be
>> submitting a phabricator diff (loosely equivalent to a github 
>> pull
>> request) and our linter will point out we use two spaces for 
>> indentation
>> instead of tabs, and 80 columns. Then a couple of peers would 
>> point out
>> that code is about twice as sparse vertically than it should. 
>> You'd fix
>> these issues for good and that would be that. This has 
>> happened quite a
>> few times. If, on the other hand, you chose to make a big deal 
>> out of
>> it, that would be a cultural mismatch that to my knowledge 
>> would be
>> unprecedented.
>>
>>
>> Andrei
>>
>
> This is great stuff for every developer to learn, but can 
> someone please create (or start creating) a code formatting 
> tool for D?
> I guess it's even worth putting some bounties on it, if that 
> helps.

I find astyle works very well for D.

http://astyle.sourceforge.net/




More information about the Digitalmars-d mailing list