get rid of null
This commit is contained in:
parent
73e2ddae69
commit
521c3c9bad
|
@ -76,21 +76,9 @@ multiline literal string (also used for string interpolation like in JS)
|
|||
|
||||
Also follows the style boolean 'c' rules of nonzero / zero, but the compiler will make fun of you
|
||||
|
||||
## null values
|
||||
|
||||
```
|
||||
let a:i8 = 3
|
||||
let b:i8
|
||||
|
||||
let x:i8 = a
|
||||
let y:i8 = b ?? 1
|
||||
|
||||
stdout.write("%d%d\n", x, y) ! outputs 3, 1
|
||||
```
|
||||
|
||||
## error
|
||||
|
||||
error is a type which describes an error that occurred, it is similar to the Go programming language and is returned as a monad like the maybe monad above and is unwrapped in a similar way. You could also think of it as
|
||||
error is a type which describes an error that occurred, it is similar to the Go programming language and is returned as a monad like the maybe monad above and is unwrapped in a similar way. You could also think of it as every variable being able to have "the type" and also "error" as a possible value.
|
||||
|
||||
```
|
||||
let error = %"something borked"
|
||||
|
|
Loading…
Reference in New Issue