PC Review


Reply
Thread Tools Rate Thread

CLS compliant names

 
 
Edward Diener
Guest
Posts: n/a
 
      17th Dec 2003
Does anyone know the correct naming conventions for CLS compliant code ?
The doc points to a really obscure and difficult to digest document on
the web about Unicode names, and I am looking for simpler rules that
tell me what names are CLS compliant. Here are some simple questions:

1) Can a CLS compliant name start with an underscore ?
2) Is there a limit to the length of a CLS complaint name ? With a full
namespace name ?


 
Reply With Quote
 
 
 
 
Daniel O'Connell
Guest
Posts: n/a
 
      17th Dec 2003

"Edward Diener" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Does anyone know the correct naming conventions for CLS compliant code ?
> The doc points to a really obscure and difficult to digest document on
> the web about Unicode names, and I am looking for simpler rules that
> tell me what names are CLS compliant. Here are some simple questions:
>

According to msdn,
CLS-compliant language compilers must follow the rules of Annex 7 of
Technical Report 15 of the Unicode Standard 3.0, which governs the set of
characters that can start and be included in identifiers. This standard is
available at http://www.unicode.org/unicode/repor...5/tr15-18.html.
For two identifiers to be considered distinct, they must differ by more than
just their case.

from Unicode Standard 3.0 Technical Report 15, Annex 7:

That is, the first character of an identifier can be an uppercase letter,
lowercase letter, titlecase letter, modifier letter, other letter, or letter
number. The subsequent characters of an identifier can be any of those, plus
non-spacing marks, spacing combining marks, decimal numbers, connector
punctuations, and formatting codes (such as right-left-mark). Normally the
formatting codes should be filtered out before storing or comparing
identifiers.

> 1) Can a CLS compliant name start with an underscore ?

From my reading of the above quotes, no.
> 2) Is there a limit to the length of a CLS complaint name ? With a full
> namespace name ?

Let me dig into the ecma spec to see if anything exists, I can post back
about that later.
>
>



 
Reply With Quote
 
Edward Diener
Guest
Posts: n/a
 
      17th Dec 2003
Daniel O'Connell wrote:
> "Edward Diener" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Does anyone know the correct naming conventions for CLS compliant
>> code ? The doc points to a really obscure and difficult to digest
>> document on the web about Unicode names, and I am looking for
>> simpler rules that tell me what names are CLS compliant. Here are
>> some simple questions:
>>

> According to msdn,
> CLS-compliant language compilers must follow the rules of Annex 7 of
> Technical Report 15 of the Unicode Standard 3.0, which governs the
> set of characters that can start and be included in identifiers. This
> standard is available at
> http://www.unicode.org/unicode/repor...5/tr15-18.html.


That's the doc which I refer to above as obscure and difficult to digest.
Making my way through it and trying to understand its terminology, was a
real PITA for me.

> For two identifiers to be considered distinct, they must differ by
> more than just their case.


I had known this from MSDN, thanks !

>
> from Unicode Standard 3.0 Technical Report 15, Annex 7:
>
> That is, the first character of an identifier can be an uppercase
> letter, lowercase letter, titlecase letter, modifier letter, other
> letter, or letter number. The subsequent characters of an identifier
> can be any of those, plus non-spacing marks, spacing combining marks,
> decimal numbers, connector punctuations, and formatting codes (such
> as right-left-mark). Normally the formatting codes should be filtered
> out before storing or comparing identifiers.


My problem reading the doc was trying to figure out what all those terms for
letters, marks, and codes actually meant. Some of them are obvious while
others require much understanding. I was lazy in trying to understand some
of the terminology, as it does seem to be unnecessarily abstruse or perhaps
poorly explained, so I asked here.

>
>> 1) Can a CLS compliant name start with an underscore ?

> From my reading of the above quotes, no.


I agree unless one of those 'letter' categories include an underscore, which
is doubtful.

>> 2) Is there a limit to the length of a CLS complaint name ? With a
>> full namespace name ?

> Let me dig into the ecma spec to see if anything exists, I can post
> back about that later.


If you find it, that would be great. You have answered an important question
in my mind since someone had posted a .NET component on one of the .NET
websites which had a protected identifier starting with an underscore, and
this turned out to be not CLS compliant. I wasn't sure that was the reason,
but suspected it, and now I can answer that thread and explain why.
Appreciated !


 
Reply With Quote
 
Daniel O'Connell
Guest
Posts: n/a
 
      17th Dec 2003

"Edward Diener" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Daniel O'Connell wrote:
> > "Edward Diener" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Does anyone know the correct naming conventions for CLS compliant
> >> code ? The doc points to a really obscure and difficult to digest
> >> document on the web about Unicode names, and I am looking for
> >> simpler rules that tell me what names are CLS compliant. Here are
> >> some simple questions:
> >>

> > According to msdn,
> > CLS-compliant language compilers must follow the rules of Annex 7 of
> > Technical Report 15 of the Unicode Standard 3.0, which governs the
> > set of characters that can start and be included in identifiers. This
> > standard is available at
> > http://www.unicode.org/unicode/repor...5/tr15-18.html.

>
> That's the doc which I refer to above as obscure and difficult to digest.
> Making my way through it and trying to understand its terminology, was a
> real PITA for me.
>
> > For two identifiers to be considered distinct, they must differ by
> > more than just their case.

>
> I had known this from MSDN, thanks !
>
> >
> > from Unicode Standard 3.0 Technical Report 15, Annex 7:
> >
> > That is, the first character of an identifier can be an uppercase
> > letter, lowercase letter, titlecase letter, modifier letter, other
> > letter, or letter number. The subsequent characters of an identifier
> > can be any of those, plus non-spacing marks, spacing combining marks,
> > decimal numbers, connector punctuations, and formatting codes (such
> > as right-left-mark). Normally the formatting codes should be filtered
> > out before storing or comparing identifiers.

>
> My problem reading the doc was trying to figure out what all those terms

for
> letters, marks, and codes actually meant. Some of them are obvious while
> others require much understanding. I was lazy in trying to understand some
> of the terminology, as it does seem to be unnecessarily abstruse or

perhaps
> poorly explained, so I asked here.
>


I suppose an underscore COULD be a modifer letter, but I doubt it and
wouldn't use it anyway.
There is also a rule in FxCop that mentinos not having members with
underscores.

> >
> >> 1) Can a CLS compliant name start with an underscore ?

> > From my reading of the above quotes, no.

>
> I agree unless one of those 'letter' categories include an underscore,

which
> is doubtful.
>
> >> 2) Is there a limit to the length of a CLS complaint name ? With a
> >> full namespace name ?

> > Let me dig into the ecma spec to see if anything exists, I can post
> > back about that later.

>
> If you find it, that would be great. You have answered an important

question
> in my mind since someone had posted a .NET component on one of the .NET
> websites which had a protected identifier starting with an underscore, and
> this turned out to be not CLS compliant. I wasn't sure that was the

reason,
> but suspected it, and now I can answer that thread and explain why.
> Appreciated !
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
List of Vista 32 bit logo compliant apps? Is Sun Java compliant? Richard Herb Windows Vista General Discussion 3 23rd Oct 2008 01:31 AM
ADA Compliant dufchick Microsoft Outlook Form Programming 0 7th Feb 2008 01:46 AM
'frmBaseForm' is not CLS-compliant because it derives from 'DockContent', which is not CLS-compliant. Pieter Microsoft C# .NET 1 26th Oct 2005 01:12 PM
'frmBaseForm' is not CLS-compliant because it derives from 'DockContent', which is not CLS-compliant. Pieter Microsoft Dot NET Framework 1 26th Oct 2005 01:12 PM
ADA Compliant Nicholas Microsoft Frontpage 0 14th Jul 2004 04:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:53 AM.