Type system 類型系統
Top type
Parent of all type
-
Object
(Javascript, Java, C#) -
any
,unknown
(TypeScript) -
std::any
(C++) -
object
(Python) -
Any?
(Kotlin) -
interface{}
(Go)
Unit type
Only one instance
-
Unit
(Kotlin, Scala) -
NoneType
(Python) -
Void
(Java, Swift) -
Null
,Undefined
(JavaScript)
Bottom type
Zero instance, no possible value allowed
-
never
(Typescript) -
Void
(Haskell) -
type.Never
(Python)