mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-22 06:51:58 +02:00
Update Speaker Notes for compound-types.md (#207)
It could be a "gotcha" moment for readers when they associate `()` with `void` from, say, C++.
This commit is contained in:
parent
dc894b1e9d
commit
4760295030
@ -55,6 +55,8 @@ Tuples:
|
||||
* The empty tuple `()` is also known as the "unit type". It is both a type, and
|
||||
the only valid value of that type - that is to say both the type and its value
|
||||
are expressed as `()`. It is used to indicate, for example, that a function or
|
||||
expression has no return value, as we'll see in a future slide.
|
||||
expression has no return value, as we'll see in a future slide.
|
||||
* You can think of it as `void` that can be familiar to you from other
|
||||
programming languages.
|
||||
|
||||
</details>
|
||||
|
Loading…
x
Reference in New Issue
Block a user