Types and the Zig Programming Language
matklad.github.io
Types and the Zig Programming Language
1–3 of 3 posts
Re: Types and the Zig Programming Language
#2One of the notable things I learned from Wirth’s Pascal was the idea of the difference between equality of types by name and by structure.
Here, it looks like Zig doesn’t allow for a way to describe the distinction.
Would it be better if the types defined by structure automatically were assigned a very ugly name isomorphic to the structure ?
Re: Types and the Zig Programming Language
#3One of the notable things I learned from Wirth’s Pascal was the idea of the difference between equality of types by name and by structure. Here, it looks like Zig doesn’t allow for a way to describe the distinction. Would it be better if the types defined by structure automatically were assigned a very ugly name isomorphic to the structure ?
You can describe these things in zig with @typeInfo, @TypeOf and anytype
https://ziglang.org/documentation/master/#typeInfo