logoalt Hacker News

ww520last Sunday at 5:53 PM0 repliesview on HN

Zig is great. I have fun writing in it. But there’re a few things bug me.

- Difficult to return a value from a block. Rust treats the value of the last expression of a block as the return value of the block. Have to jump through hoops in Zig to do it with label.

- Unable to chain optional checks, e.g. a?.b?.c. Support for monadic types would be great so general chaining operations are supported.

- Lack of lambda support. Function blocks are already supported in a number of places, i.e. the for-loop block and the catch block.