News for hackers. Stuff that matters.
Re:Easy Interfaces with Zig 0.10.0 by hansvm on Thursday November 17, 2022 @11:40AM (#33641469)
That looks right. If/else is overloaded as doing the normal thing with bools by default, and if you try to capture something exceptional with `else |y|` then the type of `x` is inferred to be something capable of such a capture -- optionals or error unions.
Re:Easy Interfaces with Zig 0.10.0 by frou_dh on Thursday November 17, 2022 @11:52AM (#33641713)
In a statically typed language, this specifically comes off to me as an artificial way to keep the total number of keywords down.