ukrainian cat ~

  • 0 Posts
  • 16 Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle













  • zig’s biggest feature is comptime. completely removes need for generics as types exist as first class at compile time. also all functions can run at comlile time. no exceptions.
    for example the Vec function accepts a type as and returns a struct that can hold arbitrary amounts of said type on the heap.


  • comptime is a huge killer feature for me. I used it to generate ARM lookup tables at compile time and it’s amazing, it also removes the need for generics as types are just arguments
    for example the Vec function accepts a type as and returns a struct that can hold arbitrary amounts of said type on the heap.
    I eventually switched to rust + proc macros tho (zig solution was MUCH cleaner!) because both ZLS and the Zig compiler are terrible and still needs a lot of work.