Re: Straw poll - naming conventions

From: Jarle Stabell (jarle_at_remove_stuff_dlogikk_spam_kills_email.com)
Date: 03/05/04


Date: Fri, 5 Mar 2004 15:27:07 +0100


"Clive Crocker" wrote:
> It seems, from my limited exposure to C#, that coding styles revert to
early
> days of ... no prefixes on anything at all. Local variables, fields
(or
> equiv), class declaration, object instances, ... there is no rule;
people
> just write what they want. Certainly the tendancy to prefix T (or t)
for
> classes... just doesnt happen.
>
> Would you say I been generall looking at poor code examples, or is
this a
> 'MS recommendation' or just a 'tendancy' for C# coders to pick and
choose
> names at will?

Most C# coders are not that experienced yet as C# coders? ;-)
I think that naming conventions are simply not as necessary nowadays as
they once were. Modern languages have classes, namespaces, more strict
typechecking (for those languages that do this at all), so naming
conventions don't play the same role as they once did. By hardcoding the
type of things into the names of things, and whether a "thing" is a
constant, a variable or a function etc, you might lower the abstraction
level of your code without much benefit. I'm not saying naming
conventions are overall bad, I still use some, f.i. I "must" be
immediately able to tell whether a name inside a method implementation
is a local variable or method argument or instance field (fXXX) or
something else.

Cheers,
Jarle



Relevant Pages

  • Re: Naming Conventions - Should I use them?
    ... I wouldn't do any Access programming without naming ... > The "no naming conventions" school of thought seems to be associated with ... > acroynyms to use as prefixes. ... > Doug Steele, Microsoft Access MVP ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Cool line of code
    ... Frank Andreas de Groot wrote: ... I like your naming conventions... ... the 'o' and 'y' prefixes? ...
    (borland.public.delphi.non-technical)
  • Re: C# coding style question
    ... I agree that we all should use conventions. ... But who made Dot Net convention anyway? ... I like prefixes. ... > I still see m_ prefixed code in MSDN mag now and then, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Interface naming conventions
    ... example of type-based naming, which, Micro$oft incorrectly labelled as ... True Hungarian naming defines prefixes for names based on what the item ...
    (comp.lang.java.programmer)
  • Re: Using interfaces "everywhere" due to (EMF) modelling framework
    ... James McGill schrieb: ... One of the benefits of a strongly-typed language is that you don't need ... the redundant naming prefixes that some people use. ...
    (comp.lang.java.programmer)