Skip to content

Commit dcacb24

Browse files
committed
up
1 parent ded6959 commit dcacb24

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/fsharp/language-reference/generics/constraints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ There are several different constraints you can apply to limit the types that ca
2121
|----------|------|-----------|
2222
|Type Constraint|*type-parameter* :> *type*|The provided type must be equal to or derived from the type specified, or, if the type is an interface, the provided type must implement the interface.|
2323
|Null Constraint|*type-parameter* : null|The provided type must support the null literal. This includes all .NET object types but not F# list, tuple, function, class, record, or union types.|
24-
|Not Null Constraint|*type-parameter* : not null|The provided type must not support the null literal. This includes both `null` annotated types and types which have null as their representation value (such as the option type).|
24+
|Not Null Constraint|*type-parameter* : not null|The provided type must not support the null literal. This disallows both `null` annotated types and types which have null as their representation value (such as the option type). This does allow value types, since those can never be null.|
2525
|Explicit Member Constraint|[(]*type-parameter* [or ... or *type-parameter*)] : (*member-signature*)|At least one of the type arguments provided must have a member that has the specified signature; not intended for common use. Members must be either explicitly defined on the type or part of an implicit type extension to be valid targets for an Explicit Member Constraint.|
2626
|Constructor Constraint|*type-parameter* : ( new : unit -> 'a )|The provided type must have a parameterless constructor.|
2727
|Value Type Constraint|*type-parameter* : struct|The provided type must be a .NET value type.|

docs/fsharp/language-reference/values/null-values.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ match x with
9393
| null -> ...
9494
```
9595

96-
Note that all these capabilities were added to the language for the interoperability purposes. Using `| null` within F# code is not considered idiomatic for denoting missing information - for that purpose use options, as described above.
96+
Note that the extra null related capabilities were added to the language for the interoperability purposes. Using `| null` within F# code is not considered idiomatic for denoting missing information - for that purpose, use options (as described above). Read more about null-related [conventions](../../style-guide/conventions.md#nulls-and-default-values) in the style guide.
9797

9898
## See also
9999

docs/fsharp/style-guide/conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ let getLineFromStream (stream: System.IO.StreamReader) : string | null =
709709
stream.ReadLine()
710710
```
711711

712-
Instead, use idiomatic F# means (e.g., options):
712+
**Instead**, use idiomatic F# means (e.g., options):
713713
```fsharp
714714
let getLineFromStream (stream: System.IO.StreamReader) : string option =
715715
match stream.ReadLine() with

0 commit comments

Comments
 (0)