You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeof(Int) == DataType
As does basically all other types of types, with the exclusion of unions and unionalls.
While we can have multiple things using same name because of shadowing,
I would find a confusing to say this name used for anything other than the original definition
Reacted by Tamas K. Papp, Amin Ya, Aaron Matthis, Alex Arslan, Eric Hanson and Dilum Aluthge
just to say I was confused by this recently. I think RecordType would be a better name, like a record in a database, since it has fields which carry data.
[comment generated via AI]
Agreed that the name is confusing next to Base.DataType. Renaming it would break every package that subtypes or dispatches on StructTypes.DataType, and StructTypes is deprecated, so the name stays. StructUtils.jl, the successor, uses trait functions (structlike, dictlike, arraylike) and has no such type.
Activity
ericphanson commentedon Jun 25, 2024
just to say I was confused by this recently. I think
RecordTypewould be a better name, like a record in a database, since it has fields which carry data.quinnj-bot commentedon Nov 18, 2026
[comment generated via AI]
Agreed that the name is confusing next to
Base.DataType. Renaming it would break every package that subtypes or dispatches onStructTypes.DataType, and StructTypes is deprecated, so the name stays. StructUtils.jl, the successor, uses trait functions (structlike,dictlike,arraylike) and has no such type.