Re: The use of underscore characters in field naming conventions



Ctrl+Left and Ctrl+Right don't work with underscores in the VBA editor
either (though they do in SQL view). And for most people, the underscore is
a seldom-used (or at least 'less frequently used') character, and will slow
down typing. So there are pros and cons, for and against. As others have
said, there's really no clear-cut right or wrong here.

I'm currently reading a book on coding guidelines for .NET, and one of the
recommendations the authors make is that you shouldn't use underscores in
names of public properties or methods, but it's OK to use them in private
properties or methods. In other words, if you're the only person who will
ever have to type those names, it's just a matter of personal preference.
But if you're exposing those names to others it is better to avoid
underscores. I'm inclined to agree with that.

--
Brendan Reynolds (MVP)


"CAD Fiend" <pelampeREMOVETHECAPS@xxxxxxx> wrote in message
news:42C1D826.193B91E2@xxxxxxxxxx
> Gotcha. But one thing about camel case is that you can't use the CTRL
> Left
> Arrow or Right Arrow on the keyboard when all of the text is together like
> that.
>
> "Douglas J. Steele" wrote:
>
>> There's really no right answer: naming conventions are just that,
>> conventions. (other than no spaces: few, if any, argue that spaces are
>> okay!)
>>
>> I personally prefer "camel case": using CapitalLetterToSeparateWords.
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>> "CAD Fiend" <pelampeREMOVETHECAPS@xxxxxxx> wrote in message
>> news:42C1CB4C.B08ABB71@xxxxxxxxxx
>> > Hello,
>> >
>> > What is the proper naming convention for naming fields? Some people
>> > will use underscores between the key words, some just use caps. I
>> > believe that you also should not us spaces. Is that correct? What
>> > about
>> > for table names and such? Does the same practice apply?
>> >
>> > TIA.
>> >
>> > Phil.
>> >
>


.



Relevant Pages

  • Re: ISO Studies of underscores vs MixedCase in Ada or C++
    ... In Ada I follow the style guide and use both underscores ... I prefer the suggestion from the Ada style guide that you don't ... One more point on the topic of consistent naming of identifiers. ... the style with using different naming conventions for functions, ...
    (comp.programming)
  • Re: ISO Studies of underscores vs MixedCase in Ada or C++
    ... In Ada I follow the style guide and use both underscores ... I prefer the suggestion from the Ada style guide that you don't ... One more point on the topic of consistent naming of identifiers. ... the style with using different naming conventions for functions, ...
    (comp.lang.ada)
  • Re: ISO Studies of underscores vs MixedCase in Ada or C++
    ... In Ada I follow the style guide and use both underscores ... I prefer the suggestion from the Ada style guide that you don't ... One more point on the topic of consistent naming of identifiers. ... the style with using different naming conventions for functions, ...
    (comp.lang.cpp)
  • Re: Open source C# namespace to convert many audio formats
    ... > perl's naming conventions and are not a very good choice in a platform that ... Same number of shift presses, ... I do use underscores. ... separate words for clarity, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: The use of underscore characters in field naming conventions
    ... Brendan Reynolds wrote: ... > Ctrl+Left and Ctrl+Right don't work with underscores in the VBA editor ... I just went and opened my VBA editor in Access, ... >> Arrow or Right Arrow on the keyboard when all of the text is together like ...
    (microsoft.public.access.tablesdbdesign)