NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Relationship to the CLS

Targeting the Common Language Specification (CLS) is an excellent way to ensure cross language interop. The CLS defines a set of programmatically verifiable rules that governs the interop of types authored in different programming languages. Although the CLS tries to encourage good library design, it does not enforce it.

The CLS is a set of rules for managed class library designers to guarantees that their APIs will be callable across a wide range of languages. There are two guiding principals for deciding what is in and what is out.

Does feature X facilitate the type of API development we want to encourage in the managed space?

Although we want the CLS to be rich enough for any managed library to be written exclusively in the CLS, more is not always better. Having ten ways to do the same task leads to confusing and bad design/usage discussions. For example providing both safe and unsafe constructs forces users to decide which they want to use. The CLS only offers type safe constructs, thereby encouraging the "correct" behavior.

Is it burdensome for a compiler to expose feature X?

All languages will take some modification to target the runtime and our VOS/VES (for example, look at the changes we made to VC and VB). But we don't have to create a huge overhead of additional work needed to be CLS compliant. The goal is for the CLS to be as small as possible and still meet the first goal. For example, parameterized types are NOT in as it is burdensome for a compiler to expose this feature.

For more information, see the Virtual Object System.