aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatthew Lugg <mlugg@mlugg.co.uk>2025-11-22 21:59:46 +0000
committerMatthew Lugg <mlugg@mlugg.co.uk>2025-11-22 22:42:37 +0000
commitc5383173a0de17210f3036acd942738e906997e5 (patch)
tree081ef03298de2fbfe679e7eb843f24036c7a9c1c /test
parent3f2cf1c002a8eb46fa9beb9854c43174b5816e67 (diff)
downloadzig-c5383173a0de17210f3036acd942738e906997e5.tar.gz
zig-c5383173a0de17210f3036acd942738e906997e5.zip
compiler: replace `@Type` with individual type-creating builtins
The new builtins are: * `@EnumLiteral` * `@Int` * `@Fn` * `@Pointer` * `@Tuple` * `@Enum` * `@Union` * `@Struct` Their usage is documented in the language reference. There is no `@Array` because arrays can be created like this: if (sentinel) |s| [n:s]T else [n]T There is also no `@Float`. Instead, `std.meta.Float` can serve this use case if necessary. There is no `@ErrorSet` and intentionally no way to achieve this. Likewise, there is intentionally no way to reify tuples with comptime fields, or function types with comptime parameters. These decisions simplify the Zig language specification, and moreover make Zig code more readable by discouraging overly complex metaprogramming. Co-authored-by: Ali Cheraghi <alichraghi@proton.me> Resolves: #10710
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions