Better branding of -betterC

Jacob Carlborg doob at
Sun Nov 1 13:58:57 UTC 2020

On 2020-11-01 03:14, Ola Fosheim Grøstad wrote:

> I can see why someone would think Zig is inspired by Jai, though. Zig 
> appears to focus on not having any "magic", so that the source is 
> explicit. Not a reasonable design rationale IMO. Properties and 
> exceptions are useful abstractions.

I don't think exceptions need to go against being explicit in the source 
code. It just happens that's how most languages implement them. For 
example, requiring functions that can throw an exception, to be 
annotated (with the exceptions it can throw). And require all those 
functions to be called with a specific syntax solves that.

If you look at how Zig (same with Swift) implements error handling, you 
see that it's very similar to how exceptions work. At least from a 
source code point of view. Then the implementation is completely 
different under the hood.

/Jacob Carlborg

More information about the Digitalmars-d mailing list