Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: After a day of Zig – a review by a Rust enthusiast (lohr.dev)
16 points by michidk 4 months ago | hide | past | favorite | 4 comments



> While their approach fits well into the C universe, I also dislike that there is no real way to add more context to an error (but well, no allocations).

This caught me off guard when I was playing with Zig. What this means is that while you can return an error such as error.InvalidChar (even without explicitly defining it first), you cannot do error.InvalidChar(c) to give back the actual character.

https://github.com/ziglang/zig/issues/2647


This issue is very interesting, thanks for linking it! Hopefully this will change in future...


More snippets would be great!


True, I added some more!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: