News for hackers. Stuff that matters.
Re:Zig, the Ideal C Replacement Or? by Simran-B on Saturday May 10, 2025 @10:20AM (#43945857)
You can simply offer a function to create an object using positional arguments if you want that
Re:Zig, the Ideal C Replacement Or? by hansvm on Sunday May 11, 2025 @09:15AM (#43953617)
You can also create a function capable of doing that for any object, or one which curries the type parameter, if you'd like to reduce the boilerplate if you have many types of objects you'd like to instantiate positionally.