D benchmark code review

Brian Rogoff brogoff at gmail.com
Fri Dec 13 09:10:46 PST 2013


On Friday, 13 December 2013 at 16:40:13 UTC, Manu wrote:
> I'm just saying, if it's code to be compared against other 
> languages, then
> it should conform to the general standards of the language.
> I've never seen D code use egyptian braces.

You've never read TDPL.

.. or Ali Cehreli's D tutorial.

... or looked at the D Rosetta code examples


> Certainly the vast majority of
> D code doesn't. I don't care which, but stick with one as a 
> 'standard'. D
> has clearly chosen C braces,

D is not a sentient being and can't choose anything. Some group 
of D coders chose that brace placement and 8 space indentation. 
Others have chosen a style which favors less extravagant usage of 
screen or book page real estate.

> If you were going to publish some Java code using C braces, how 
> would you feel about that?

Feel free! I acknowledge that Phobos has specified a style, but 
this isn't a Phobos submission. I can read either (and more!) but 
I have noticed that what you're calling Java style is catching on 
across a number of languages with C inspired syntax. There are 
advantages to that.

If you feel strongly about this you may prefer Nimrod, which 
removes the choice from you, like Python. There are advantages to 
that, too.

-- Brian



More information about the Digitalmars-d mailing list