5 ms·
Hint: It's `catch {}` instead of `catch { ... }`.
by nonsequitur 4y ago
Hint: It's `catch {}` instead of `catch { ... }`.
- anonymoushn 4y agoThat'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.
- wyldfire 4y agoThat makes sense. But it's easy to confuse a prose ellipsis with the C++ notation for indicating the wildcard exception acceptance pattern.
- kjs3 4y agoZig is not C++.
- hibbelig 4y agoMay no programming language ever introduce “foo” or “bar” keywords, lest mayhem be upon us.
- planckscnst 4y agoNow I'm thinking there must be some brainfuck-like language called foobar.
- wyldfire 4y agoSorry, 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.
- 0des 4y agoThat'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.