Some .net Theory question: Which libraries are actually standardized? I know that there is the Common Type System which specifies things like 32-Bit Integers and all this low level info, but I'm confused about the status/relation of the Common Language Specification and the Base Class Libraries.
There are some fundamental types in the system: System.Object, System.ValueType, System.Exception. But what about things like System.String and it's methods/properties like .Length, .StartsWith or string.IsNullOrEmpty?
Are these part of any standard? Is ECMA-335 enough to implement a CLS-compliant .net Runtime?
PS: I know that many functions that people use everyday are not standards-compliant but part of Microsofts proprietary .net Framework implementation. This is not about running existing Apps under some unsupported Operating System, I would look at Mono for that. This is really a theoretical question about what makes the core of .net, what is the .net Standard Library.
Check out Partition IV of the Ecma spec. It defines the "standard runtime library". However, there isn't a single "standard library". It defines 2 profiles: a kernel profile and a compact profile, and 7 libraries. The compact profile is a super set of the kernel profile. Several of the libraries it defines are "optional" and are not associated with either profile. It also identifies some CLR features that are "optional" and may not be covered by all implementations.
The BCL (base class library) as defined in the Ecma spec is just one of the 7 libraries it defines.
The CLS, or common language specification, is a set of guidelines for API design that promotes maximal language interoperability.
As defined in Section 7.2 in partition I of the ecma spec there are 3 views of CLS compliance:
The exact requirements for each of these are listed in the ECMA spec.
In any case, there is no concept of a "CLS Compliant .NET Runtime". The ".NET Runtime" consists of everything in the runtime system. CLS compliance, however, is only concerned with the interface of publicly visible items.