Hacker News
new
past
comments
ask
show
jobs
points
by
Xirdus
4 hours ago
|
comments
by
rcxdude
2 hours ago
|
next
[-]
Rust does have
https://doc.rust-lang.org/std/any/trait.Any.html
but it's not quite the same thing (for one thing, it's not actually all types).
reply
by
2 hours ago
|
parent
|
[-]
deleted
reply
by
afdbcreid
2 hours ago
|
prev
|
next
[-]
Also called top and bottom types, for this reason.
reply
by
steveklabnik
2 hours ago
|
parent
|
[-]
Any is not a top type and ! is not a bottom type, actually. They are sort of similar from a lay perspective if you squint, though.
reply
by
afdbcreid
2 hours ago
|
parent
|
[-]
Why not? I mean if you refer to Rust specifically, yes, because there is no subtyping except for lifetimes, only coercion (and `Any` also cannot contain any type). But in general, why not?
reply
by
steveklabnik
1 hours ago
|
parent
|
[-]
I am speaking about Rust specifically, yes.
reply
by
boston_clone
3 hours ago
|
prev
|
[-]
Comprehensive yet succinct, and appreciate you tying it to math - that helped solidify the idea.
reply