Updated C# and .NET docs supplement (markdown)
parent
d5538a5f63
commit
3e680367e9
|
@ -3,7 +3,7 @@ To save us repeating our complaints about the lack of proper documentation under
|
|||
|
||||
## Deceptive collection type names
|
||||
|
||||
`IReadOnly{Collection,Dictionary,List,Set}` are for getting read-only views of the collections that implement them. They do not mean the collection is immutable (there are [separate classes](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable?view=net-6.0) for that).
|
||||
`IReadOnly{Collection,Dictionary,List,Set}` are for getting read-only views of the collections that implement them. They do not mean the collection is immutable (there are [separate classes](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable?view=net-6.0) for that). The same goes for `ReadOnlySpan`.
|
||||
|
||||
> Kotlin got this right by calling its interfaces e.g. `List`/`MutableList` instead of `IReadOnlyList`/`IList`. (And it also fixed the inheritance hierarchy.)
|
||||
|
||||
|
|
Loading…
Reference in New Issue