-
-
Notifications
You must be signed in to change notification settings - Fork 9
successful
IsaacShelton edited this page Mar 21, 2022
·
1 revision
successful
represents the type of a boolean value that indicates success or failure. It can be either true
or false
.
Primitive Type | Bits | Size | Signed-ness | Possible Values | C Equivalent (Roughly) |
---|---|---|---|---|---|
successful |
1 bit | 1 byte | ~ | true or false | bool |
successful
is effectively an alias of bool
. Both types are mutually convertible to/from each other.
successful
exists to clearly differentiate between functions/methods that return boolean results, and functions that return whether they were successful.
func getBooleanValue(value bool) bool {
return value
}
func maybeDoThing(should_fail bool) successful {
return !should_fail
}