Skip to content

Commit

Permalink
reference: Remove mention of unit type
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrik Sverdrup committed Apr 23, 2015
1 parent aa93c11 commit e223e5c
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3437,14 +3437,6 @@ of the tuple. It has no nominal name and is instead structurally typed.
Tuple types and values are denoted by listing the types or values of their
elements, respectively, in a parenthesized, comma-separated list.

The empty tuple is the "unit" type `()`, having the single value `()`
(occasionally called "nil"). [^unittype]

[^unittype]: The "unit" value `()` is *not* a sentinel "null pointer" value for
reference variables; the "unit" type is the implicit return type from functions
otherwise lacking a return type, and can be used in other contexts (such as
message-sending or type-parametric code) as a zero-size type.]

Because tuple elements don't have a name, they can only be accessed by
pattern-matching or by using `N` directly as a field to access the
`N`th element.
Expand Down

0 comments on commit e223e5c

Please sign in to comment.