Jump to page: 1 2
Thread overview
New D coding convention style guide
Aug 20, 2006
Walter Bright
Aug 20, 2006
kris
Aug 20, 2006
Chris Miller
Re: New D coding convention style guide (brace formatting)
Aug 21, 2006
Bruno Medeiros
Aug 21, 2006
Ivan Senji
Aug 21, 2006
Walter Bright
Aug 21, 2006
kris
Aug 21, 2006
Walter Bright
Aug 21, 2006
kris
Aug 22, 2006
Don Clugston
Aug 22, 2006
kris
doku??
Aug 21, 2006
Richard Koch
Aug 21, 2006
Walter Bright
Aug 23, 2006
Markus Dangl
Aug 22, 2006
Bruno Medeiros
Aug 23, 2006
Charles D Hixson
Aug 23, 2006
Kristian
Aug 23, 2006
Charles D Hixson
August 20, 2006
http://thc.segfault.net/root/phun/unmaintain.html
August 20, 2006
Walter Bright wrote:
> 
> http://thc.segfault.net/root/phun/unmaintain.html

Some good advice on tab-usage there:

"Never underestimate how much havoc you can create by indenting with tabs instead of spaces, especially when there is no corporate standard on how much indenting a tab represents. Embed tabs inside string literals, or use a tool to convert spaces to tabs that will do that for you."
August 20, 2006
On Sat, 19 Aug 2006 20:03:35 -0400, Walter Bright <newshound@digitalmars.com> wrote:
> http://thc.segfault.net/root/phun/unmaintain.html

I'll begin converting my code...
August 21, 2006
Walter Bright wrote:
> 
> http://thc.segfault.net/root/phun/unmaintain.html
>  From - Mon

Speaking of which (but seriously), we may not get a consensus on tabs, and maybe justifiedly so, but one other thing with DMD's coding convention that troubles me is the braces formatting:

    if (b)
    {    dg();
    return true;
    }

... whoa :/ . Where did that come from? It's unusual (I personally have never seen C-family code formatted that way), and seems awkward to me. How about:

    // BSD/Allman style
    if (b)
    {
    dg();
    return true;
    }

or (my preference) :
    // K&R style
    if (b) {
        dg();
        return true;
    }
?
August 21, 2006
Bruno Medeiros wrote:
> Walter Bright wrote:
>>
>> http://thc.segfault.net/root/phun/unmaintain.html
>>  From - Mon
> 
> Speaking of which (but seriously), we may not get a consensus on tabs, and maybe justifiedly so, but one other thing with DMD's coding convention that troubles me is the braces formatting:
> 
>     if (b)
>     {    dg();
>     return true;
>     }
> 
> .... whoa :/ . Where did that come from? It's unusual 

It sure is!

> (I personally have never seen C-family code formatted that way), and seems awkward to me. How about:
> 
>     // BSD/Allman style
>     if (b)
>     {
>     dg();
>     return true;
>     }
> 
> or (my preference) :
>     // K&R style
>     if (b) {
>         dg();
>         return true;
>     }
> ?

No, No!
Everyone knows it should really be:

if(b)
{
  dg();
  return true;
}

;) :P
August 21, 2006
Bruno Medeiros wrote:
> Walter Bright wrote:
>>
>> http://thc.segfault.net/root/phun/unmaintain.html
>>  From - Mon
> 
> Speaking of which (but seriously), we may not get a consensus on tabs, and maybe justifiedly so, but one other thing with DMD's coding convention that troubles me is the braces formatting:
> 
>     if (b)
>     {    dg();
>          return true;
>     }
> 
> ... whoa :/ . Where did that come from? It's unusual (I personally have never seen C-family code formatted that way), and seems awkward to me. 

It's just:

	if (b)
	{
	   dg();
	   return true;
	}

compressed to save precious vertical screen space.
August 21, 2006
Walter Bright wrote:
> Bruno Medeiros wrote:
> 
>> Walter Bright wrote:
>>
>>>
>>> http://thc.segfault.net/root/phun/unmaintain.html
>>>  From - Mon
>>
>>
>> Speaking of which (but seriously), we may not get a consensus on tabs, and maybe justifiedly so, but one other thing with DMD's coding convention that troubles me is the braces formatting:
>>
>>     if (b)
>>     {    dg();
>>          return true;
>>     }
>>
>> ... whoa :/ . Where did that come from? It's unusual (I personally have never seen C-family code formatted that way), and seems awkward to me. 
> 
> 
> It's just:
> 
>     if (b)
>     {
>        dg();
>        return true;
>     }
> 
> compressed to save precious vertical screen space.


 ... get a flat-panel that can be rotated into portrait mode. The 24" Dell displays more lines of code (in portrait orientation) than you can shake a stick at :)
August 21, 2006
kris wrote:
>  ... get a flat-panel that can be rotated into portrait mode. The 24" Dell displays more lines of code (in portrait orientation) than you can shake a stick at :)

There's never enough screen real estate (but I now can't imagine working on 24 line displays like I used to).
August 21, 2006
Walter Bright wrote:
> kris wrote:
> 
>>  ... get a flat-panel that can be rotated into portrait mode. The 24" Dell displays more lines of code (in portrait orientation) than you can shake a stick at :)
> 
> 
> There's never enough screen real estate (but I now can't imagine working on 24 line displays like I used to).

likewise
August 21, 2006
this all is need, super and thanx walter, - but any chance to get the html help as a printable pdf or like wise?

rko
« First   ‹ Prev
1 2