News for hackers. Stuff that matters.
Re:Zig 0.5.0 Release Notes by samtheprogram on Monday September 30, 2019 @01:26PM (#21117646)
Could you follow up with some examples? Seems to contradict the parent but neither comment provides examples.
Re:Zig 0.5.0 Release Notes by rhodysurf on Monday September 30, 2019 @01:56PM (#21117947)
They got rid of the % operator for error propagation for one.
Re:Zig 0.5.0 Release Notes by renox on Monday September 30, 2019 @03:12PM (#21118673)
That's funny; one selling point of rust is the easy propagation of errors thanks to the '?' but zig removed the % which was the equivalent I think
Re:Zig 0.5.0 Release Notes by AnIdiotOnTheNet on Monday September 30, 2019 @03:21PM (#21118773)
The operator wasn't removed, it was replaced by a keyword. See the documentation on error handling: https://ziglang.org/documentation/master/#catch
Re:Zig 0.5.0 Release Notes by rhodysurf on Monday September 30, 2019 @03:20PM (#21118766)
You can still propagate errors in zig using ? like in rust. they just simplified it