Hacker News new | ask | show | jobs
by nonsequitur 1534 days ago
Hint: It's `catch {}` instead of `catch { ... }`.
1 comments

That's right if you want to do nothing on error. I think TFA uses `...` to represent the code they would actually want to run if an error happened.
That's how I've always interpreted it unless its a convo about slices which are few. Everyone knows slices are the bees knees item 9, so not often does it need discussing.
That makes sense. But it's easy to confuse a prose ellipsis with the C++ notation for indicating the wildcard exception acceptance pattern.
Zig is not C++.
May no programming language ever introduce “foo” or “bar” keywords, lest mayhem be upon us.
Now I'm thinking there must be some brainfuck-like language called foobar.
Sorry, I suppose you could infer that but it was not my intent. It was merely my suggestion that someone's new exposure to Zig might be 'tainted' by previous exposure to C++ syntax.