[Mono-devel-list] CLS compliance

Olaf Monien olaf at atozed.com
Wed Jun 15 03:23:51 EDT 2005

while porting a library of ours to be usable under mono, we just come
accross an issue which has some impacts on non-C# .NET languages.

in Mono.Security there is a MiniParser class which is declared to be
non-CLS compliant:

*namespace* Mono.Xml {


I did not try to find out what CLS compliancy requirements are not met
in detail, but there is one which causes this class to be less usable
with some .NET languages:

It defines public/protected identifiers that are distinct by char case only:

*public* *class* XMLError : Exception {
  *protected* *int* line, column;
  *public* *int* Line {get {*return* line;}}
  *public* *int* Column {get {*return* column;}}

This makes all compilers stumble which are not casesentive (such as Pascal).
Note: I'm not trying to start a discussion if casesensitivity makes
sense or not, this is just about  "compatibility". To provide a library
that is thought to be availble for many different .NET
compilers/languages, non-cls compliant code should be avoided as much as
possible. In this "line vs. Line" case its just a road block and should
be changed.

ps: the [CLSCompliant(*false*)] correctly declares  that piece of code 
to be non-compliant, but of course it does not make Pascal-compilers
case-senstive ;-)


Olaf Monien
Atozed Software

Manage your Website the smart way!
Free CMS: www.atozed.com/iws

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050615/3c76df4d/attachment.html 

More information about the Mono-devel-list mailing list