Changed heading to be more meaningful
authorMert <mert@meltabi.com>
Sat, 28 Feb 2015 21:47:31 +0000 (23:47 +0200)
committerMert <mert@meltabi.com>
Sat, 28 Feb 2015 21:47:31 +0000 (23:47 +0200)
Documentation/intro-to-clr.md

index 52a403a..f7a581f 100644 (file)
@@ -140,7 +140,7 @@ For type safety, conceptually each memory allocation is associated with a type.
 
 One the most important of these type-specific guarantees is that the visibility attributes associated with a type (and in particular with fields) are enforced.  Thus, if a field is declared to be private (accessible only by the methods of the type), then that privacy will indeed be respected by all other type-safe code.  For example, a particular type might declare a count field that represents the count of items in a table.  Assuming the fields for the count and the table are private, and assuming that the only code that updates them updates them together, there is now a strong guarantee (across all type-safe code) that the count and the number of items in the table are indeed in sync.  When reasoning about programs, programmers use the concept of type safety all the time, whether they know it or not.  The CLR elevates type-safety from being simply a programming language/compiler convention, to something that can be strictly enforced at run time.
 
-### Enforcing memory safety (Verifiable Code)
+### Enforcing Verifiable Code (Memory and Type Safety)
 
 Conceptually, to enforce type safety, every operation that the program performs has to be checked to ensure that it is operating on memory that was typed in a way that is compatible with the operation.  While the system could do this all at runtime, it would be very slow.  Instead, the CLR has the concept of [CIL][cil-spec] verification, where a static analysis is done on the [CIL][cil-spec] (before the code is run) to confirm that most operations are indeed type-safe.  Only when this static analysis can't do a complete job are runtime checks necessary.  In practice, the number of run-time checks needed is actually very small.  They include the following operations: