try/catch idiom in std.datetime

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Nov 19 17:39:13 PST 2013


On Tue, Nov 19, 2013 at 08:30:18PM -0500, John J wrote:
> On 11/19/2013 04:21 PM, Andrei Alexandrescu wrote:
[...]
> >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.
[...]
> 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.

The main holdup is the lack of a ready-made, official D lexer/parser.
Nobody wants to manually maintain their own version of the D
lexer/parser given how fast the language is still developing (plus, it
sucks to have to keep fixing lexing/parsing bugs just because DMD's
lexer/parser doesn't quite work the way you thought it would).

Once we have this in place, I'm quite confident that a lot of nice D
tools would spring up. Pretty-printing is, after all, one of the
simplest uses of lexers/parsers.


T

-- 
One reason that few people are aware there are programs running the
internet is that they never crash in any significant way: the free
software underlying the internet is reliable to the point of
invisibility. -- Glyn Moody, from the article "Giving it all away"


More information about the Digitalmars-d mailing list