Re: CSharp
- From: "Mike Schilling" <ap@xxxxxxxxxxxxxxxx>
- Date: Sun, 4 Mar 2007 22:44:57 -0800
Arne Vajhøj wrote:
Jon Skeet [C# MVP] wrote:
Arne Vajhøj <arne@xxxxxxxxxx> wrote:
How do you mean? Aren't indentation and "where you put the braces"Both SUN and MS has published coding conventions.
merely a cosmetic and personal preference in both Java and C#?
I follow SUN coding concvention for Java and MS coding
convention for C# (unless told otherwise).
So I move the start curly brackets when I convert
code between Java and C#.
There's a lot of point in following *naming* conventions when writing
your own code, as it means it fits in well with the rest of the
framework. Brace position, however, is more of a private matter IMO.
It's good to have consistency within a project, but it makes no
difference otherwise.
It is not particular funny for maintenance programmers if
half the code uses K&R and the other half Allman.
Which I believe is why Jon said "Within a project".
Today's IDEs make it simple enough to make brace style, indenting, etc.
consistent within a file. Unfortunately, the weird disconnect that exists
between IDEs, which know enough about language syntax to make reformatting,
renaming variables, etc a snap, and SCM systems, which know nothing but
lines and bytes in lines [1] means that this sort of reformatting can
introduce many spurious diffs that obfuscate the history of the file.
1. And in many cases, even treat CR vs. CRLF line-termination as a
significant difference.
.
- Follow-Ups:
- Re: CSharp
- From: Arne Vajhøj
- Re: CSharp
- References:
- Re: CSharp
- From: Mark Rae
- Re: CSharp
- From: Mike Schilling
- Re: CSharp
- From: Mark Rae
- Re: CSharp
- From: Arne Vajhøj
- Re: CSharp
- From: Dylan Parry
- Re: CSharp
- From: Arne Vajhøj
- Re: CSharp
- From: Jon Skeet [C# MVP]
- Re: CSharp
- From: Arne Vajhøj
- Re: CSharp
- Prev by Date: Re: Modifying List items (generics)
- Next by Date: Re: Alternative to global variables in c++: Newbie
- Previous by thread: Re: CSharp
- Next by thread: Re: CSharp
- Index(es):
Relevant Pages
|