Avatar
omochimetaru 4/18/2017 2:58 AM
えーっと
2:58 AM
発端は @takasek さんの以下の発表で https://speakerdeck.com/takasek/what-is-a-nominal-type
❤ 1
2:58 AM
nominal type自体は
2:59 AM
型システム理論での概念で https://en.wikipedia.org/wiki/Nominal_type_system
In computer science, a nominal or nominative type system (or name-based type system) is a major class of type system, in which compatibility and equivalence of data types is determined by explicit declarations and/or the name of the types. Nominal systems are used to determine if types are equivalent, as well as if a type is a subtype of another. It contrasts with structural systems, where comparisons are based on the structure of the types in question and do not require explicit declarations.
❤ 1
2:59 AM
そこらへんを指して話していて
2:59 AM
僕はSwiftのNominal Type Descriptorとの対応でちゃんとは考えていませんでした。
2:59 AM
というか、そんなものがあるのは今しったw
3:01 AM
The kind of type is stored at offset 0, which is as follows: 0 for a class, 1 for a struct, or 2 for an enum. 結果的に認識とは一致していそう。タプルやファンクションはnon-nominalですね