Article View: borland.public.csharpbuilder.language.csharp
Article #215Two basic questions
From: Bob Dawson
Date: Sun, 09 Jul 2006 01:53
Date: Sun, 09 Jul 2006 01:53
32 lines
2485 bytes
2485 bytes
(Simple but broad)
1. What are people generally using for a style guide? Two issues are really
puzzling me
a. Case sensitivity. As a long time non-case sensitive Delphi user, I tend
to hate code like
ThisClass thisClass - new ThisClass();
or property Something implemented with private field something, but that
does seem to be widely accepted, and the idea of 'UpperCase means
Class/Struct; lowerCase means instance' is at least a consistent standard
(though how it explains Something/something escapes me), so maybe I could
get used to it if I just gritted my teeth for a while.
b. Code organization. What rules have other Delphi folks adopted? In Delphi
for me it's always been private/protected/public, alphabetical within
section, but I don't get a sense that there's any real concensus for the
layourt of CSharp classes. What standards do people use to judge a
well-organized class?
I'm willing to give up my Delphi prejudices and write CSharp as
CSharp--but the various style guiides I've read seem to vary quite a bit in
their recommendations. I wonder if a winner is emerging.
(simple and narrow)
2. Most of the CSharp text I've looked at all explain that string is an
alias for System.String, int is an alias for System.Int32, etc. And the
advice is almost universally to use the CSharp aliases rather than the built
in System types. But nobody ever says why. So why? It bugs me especially
since I'm trying to get used to the 'UpperCase means Class/Struct; lowerCase
means instance' rule, then told to use lower case alias for all the value
types. Where's the consistency to that? grumble grumble <g>
bobD
Technical Details
Message-ID:
<44b0539d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,dc12dddeb5f6ea0,start X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Bob Dawson" <RBDawson@prodigy.net> Newsgroups: borland.public.csharpbuilder.language.csharp Subject: Two basic questions Date: Sat, 8 Jul 2006 19:53:58 -0600 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 NNTP-Posting-Host: 71.32.76.154 Message-ID: <44b0539d$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1152406429 71.32.76.154 (8 Jul 2006 17:53:49 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail