On Tuesday, 19 November 2013 at 21:21:30 UTC, 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
Man, I thought these debates died out long ago. All that matters
in style is readability and consistency.
Looking at that code linked above::
1. Is the code formatting consistent? Yes
2. Is the code formatting consistent within the repo? Yes
3. Is the code formatting easily read by a programmer? Yes
Whether you, I, or anyone else like with the style is irrelevant.
Personally I'm not a fan, but that doesn't make the author a bad
programmer, nor does it make me right. It simply means:
a) Jacob and I prefer different formatting styles and
b) I need to adapt if I'm to work on dstep.
Now if dstep was written at Facebook then OK, the code would need
reformatting because it violates point 2. above.
As for Phobos code, insist on tighter style guidelines. No one
will care as long as it is consistent and readable. Any
programmer worth anything will just adhere to it happily. Those
that don't want to are not going to have much to contribute,
they're more worried about their personal style than advancing
Phobos and D with great code.
Cheers.