E0105
A type or a function used as a value
ErrorThe name of a type, f64 or a class such as Point, is not a value. It names a type, and only a conversion call f64(n), a constructor call Point(x: 1), or a member of a built-in type, such as f64.pi, can follow it.
The name of a function, a prelude function such as print included, is not a value either. Call it: g(), not g.
Why
let x = f64 looks like it should name something, but a type has no value to store, print or pass. Reporting "cannot find binding" would be wrong too: the name is in scope, as a type. For a constant of f64, write f64.pi. For a conversion, call it: f64(n).
Sisu has no function values: a function can only be called.
Broken
fn main() {
let x = f64
print(x)
}
What sisu says
error[E0105]: `f64` is a type, not a value --> E0105.sisu:2:13 | 2 | let x = f64 | ^^^ sisu: 1 error sisu: for more on a code, run `sisu explain <code>`: E0105
Fixed
fn main() {
let x = f64.pi
print(x)
}
Sisu