From b7e78791094ff24f5f23801d6b807b5e3bf44cfb Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Sat, 2 Sep 2017 12:53:10 +0100 Subject: [PATCH] Capitalisation of ReadOnlySpan (#875) Although C# has the `readonly` keyword, the common usage is to have the term hyphenated as _read-only_. This would mean the term should have a capital O. I.e. `ReadOnlySpan` rather than `ReadonlySpan`. This matches `IReadOnlyCollection` and friends. --- proposals/span-safety.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proposals/span-safety.md b/proposals/span-safety.md index bdb94c7..1b4a31a 100644 --- a/proposals/span-safety.md +++ b/proposals/span-safety.md @@ -2,7 +2,7 @@ ## Introduction -The main reason for the additional safety rules when dealing with types like `Span` and `ReadonlySpan` is that such types must be confined to the execution stack. +The main reason for the additional safety rules when dealing with types like `Span` and `ReadOnlySpan` is that such types must be confined to the execution stack. There are two reasons why `Span` and similar types must be a stack-only types. @@ -11,7 +11,7 @@ There are two reasons why `Span` and similar types must be a stack-only types All the above problems would be alleviated if instances of `Span` are constrained to exist only on the execution stack. -An additional problem arises due to composition. It would be generally desirable to build more complex data types that would embed `Span` and `ReadonlySpan` instances. Such composite types would have to be structs and would share all the hazards and requirements of `Span`. As a result the safety rules described here should be viewed as applicable to the whole range of **_ref-like types_** +An additional problem arises due to composition. It would be generally desirable to build more complex data types that would embed `Span` and `ReadOnlySpan` instances. Such composite types would have to be structs and would share all the hazards and requirements of `Span`. As a result the safety rules described here should be viewed as applicable to the whole range of **_ref-like types_** The draft language specification is intended to ensure that values of a ref-like type occurs only on the stack.