Meaning of words CTS
Asked Answered
S

4

8

As the English is not my native language I would like to know the exact semantic of words Common Type System (CTS). Can they be interpretated as a system of common types or as a type system that is common for .NET Framework? That is whether the system is common or the types are common.:)

Selfliquidating answered 6/7, 2014 at 20:33 Comment(0)
T
4

That's the second option, it's a "type system" (the way you define classes, methods, attributes, ..) that is "common" to all languages on the .Net platform (C#, VB, F#, ...). Of course, I may remember wrong, but I'm pretty sure that the term 'CTS' refers explicitely to the way the CLR*) stores and uses the metadata that describe how everything is structured.

*) you've probably also seen the CLR term already. It's Common Lnguage Runtime. Its "common"-ness is liguistically structed in the same way. It is not a "common lanuage" runtime, but it's common "language runtime", it's an execution platform common to all.

However -- actually -- there is also some slight meaning in the "second way" you proposed. There are some types that are actually common, for example the most basic collections (ArrayList, Collection, HashSet, ...) or interfaces (IEnumerable, IList, ...). However they are called BCL, the Base Class Library.

Torritorricelli answered 6/7, 2014 at 20:40 Comment(0)
H
4

From his book (Pro C# 2008 and the .NET 3.5 Platform) , Andrew Troelsen says under the headline:

Introducing the Building Blocks of the .NET Platform (the CLR,CTS,and CLS)

Another building block of the .NET platform is the Common Type System,or CTS.The CTS specification fully describes all possible data types and programming constructs supported by the runtime, specifies how these entities can interact with each other, and details how they are repre- sented in the .NET metadata format (more information on metadata later in this chapter; see Chapter 16 for complete details). Understand that a given .NET-aware language might not support each and every feature defined by the CTS. The Common Language Specification(CLS)is a related specification that defines a subset of common types and programming constructs that all .NET programming lan- guages can agree on. Thus, if you build .NET types that only expose CLS-compliant features, you can rest assured that all .NET-aware languages can consume them. Conversely, if you make use of a data type or programming construct that is outside of the bounds of the CLS, you cannot guarantee that every .NET programming language can interact with your .NET code library

then comes this beautiful figure that sums it all up:

.NET components

I hope that help :)

Himeji answered 6/7, 2014 at 20:59 Comment(3)
There are some confusing words "The Common Language Specification(CLS)is a related specification that defines a subset of common types" So the word common is mentioned twice in different meanings.:)Selfliquidating
As the figure shows, CLS is a subset of CTS. CLS is supported by any language using .NET, while CTS is not supported by all languages, thats the most important differenceHimeji
Rethinking about your point, i think you have a point regarding confusion. So CLS should be (common language specifications) and CTS should be (semi-Common Type System) , i hope i didnt confuse you more :pHimeji
P
2

The latter.

From the MSDN article on CTS:

Establishes a framework that helps enable cross-language integration, type safety, and high-performance code execution.

(emphasis mine)

Microsoft is using "common" to mean "mutual; shared by more than one" (first adjective definition from Wiktionary). That is, a type system shared by more than one language.

Panga answered 6/7, 2014 at 20:40 Comment(1)
Not types. It's the type system that is shared. The structure of metadata about classes, methods, parameters, attributes, etc is shared, so that all languages can understand the rough structure of constructs defined by either of them. The CTS defines what is a method, what is a class, what is parameter. All CTS/CLR-based languages can build on it or map to it, so they can all interoperate without really painful translations.Torritorricelli
K
2

It is a 'type system' that is 'common'. I think Wikipedia explains CTS best:

Common Type System (CTS) is a standard that specifies how type definitions and specific values of types are represented in computer memory.

Kasandrakasevich answered 6/7, 2014 at 20:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.