On 14 December 2013 03:10, Brian Rogoff <[email protected]> wrote: > 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. >
Published material, optimised for print. Andrei admits this. He uses C braces in his code. .. or Ali Cehreli's D tutorial. > Possibly following Andrei's lead, and possible consideration for print? ... or looked at the D Rosetta code examples No, not really. That's a bit sad. I'd make the same argument there if it's as you say though. 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! You're saying you wouldn't find it unconventional, and perhaps ammateur looking? I acknowledge that Phobos has specified a style, but this isn't a Phobos > submission. I take druntime and phobos as they are the largest and most widely used body of D code, along with many other projects I've run into that also follow that lead. I'm yet to encounter any exceptions. 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. I only feel strongly about not being ambivalent on the matter. When I write Java, I use egyptian braces, and then it looks like Java code. Most people seem to understand that that's an expectation in Java. When I write C code, I use C braces. I think C became widely confused soon after university CS courses started teaching Java primarily, then you have inexperienced post-grads bring their Java habits into their C code. If D deliberately commits to the 'university post-grad syndrome' principle that C has found itself in, then I find that to be sad. However, clearly, since there's debate on this, D _has_ already inadvertently made that commitment. Oh well.
