-
Notifications
You must be signed in to change notification settings - Fork 192
Open
Labels
Content issueA problem in with the book's prose, code, or figuresA problem in with the book's prose, code, or figures
Description
Location
| `os()` | `macOS`, `iOS`, `watchOS`, `tvOS`, `visionOS`, `Linux`, `Windows` | |
> *operating-system* → **`macOS`** | **`iOS`** | **`watchOS`** | **`tvOS`** | **`visionOS`** | **`Linux`** | **`Windows`** \ |
Description
The lists of valid OS names used with os()
are incomplete, as the language supports a variety of other OS names such as WASI
and FreeBSD
.
Correction
We should either leave the list open-ended, or try to comprehensively list everything the compiler supports.
It's also worth noting that if a developer passes some unsupported OS name, it's not a compiler error—the compiler will accept it, emit a warning, and just ignore the code as if it said false
instead of os(whatever)
. So perhaps the grammar should reflect that, if possible.
Metadata
Metadata
Assignees
Labels
Content issueA problem in with the book's prose, code, or figuresA problem in with the book's prose, code, or figures