if(blaBla)
  InitializeThisBecauseWeForgotSomething();
else
  WeNeedToDoSomethingElseInHere();

On Fri, Jun 29, 2012 at 2:36 PM, Wallace Turner <[email protected]>wrote:

>  comments??? are you feeling ok today mate??
>
>
> On 29/06/2012 2:32 PM, Corneliu I. Tusnea wrote:
>
> The main reason I like the brace on the next line is because I generally
> use that line for a comment explaining that branch of the code.
> For a function is not that relevant but for an if or for statement is
> becomes relevant:
>
>  if ( bla bla )
> { // We need to initialize this because we forgot or something on those
> lines
>  ... more code here
> }
> else
> { // we need to do something else in here
> ... and there goes more code ...
> }
>
>  Squashing the brace on the same line as the statement was ok when we
> could only see 40 lines but now with FullHD screens just feels a "visual
> optimization" that has no reason anymore.
>
>  Corneliu.
>
>
> On Fri, Jun 29, 2012 at 1:26 PM, Greg Keogh <[email protected]> wrote:
>
>>  So Resharper prefers vertical aligned braces (which I have
>> traditionally used). Now we have a schism because most of the sample code I
>> see lately and the Framework design guidelines use indented braces. Which
>> authority do we believe or follow?
>>
>>
>>
>> I was thinking that I must prefer vertical braces because I like visual
>> symmetry and less clutter. Although the right align braces only add a tiny
>> amount of extra clutter on a line they do disturb the symmetry.
>>
>>
>>
>> public void FooBar() {
>>
>>   Something();
>>
>> }
>>
>>
>>
>> Some reputable books I have use vertical braces for namespace and class
>> definitions, but indented ones for functions and properties. Go figure?!
>>
>>
>>
>> Maybe F# has the answer where the actual indentation is more important
>> and there is little need for block delimiters.
>>
>>
>>
>> Greg
>>
>>
>>
>
>
>
>

Reply via email to