[–] whitten 2y ago ↗ One 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 ? [–] hallajs 2y ago ↗ You can describe these things in zig with @typeInfo, @TypeOf and anytypehttps://ziglang.org/documentation/master/#typeInfohttps://ziglang.org/documentation/master/#TypeOfhttps://ziglang.org/documentation/master/#Keyword-Reference
[–] hallajs 2y ago ↗ You can describe these things in zig with @typeInfo, @TypeOf and anytypehttps://ziglang.org/documentation/master/#typeInfohttps://ziglang.org/documentation/master/#TypeOfhttps://ziglang.org/documentation/master/#Keyword-Reference
2 comments
[ 3.0 ms ] story [ 12.8 ms ] threadHere, 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 ?
https://ziglang.org/documentation/master/#typeInfo
https://ziglang.org/documentation/master/#TypeOf
https://ziglang.org/documentation/master/#Keyword-Reference