[OT] Error handling in C3 language
Kapendev
alexandroskapretsos at gmail.com
Sat Oct 25 03:13:40 UTC 2025
On Friday, 24 October 2025 at 11:07:40 UTC, Vinod K Chandran
wrote:
> On Thursday, 29 May 2025 at 20:18:27 UTC, Kagamin wrote:
>> https://c3-lang.org/language-common/optionals-advanced/
>> The language is quite nice, resembles BetterC, but also the
>> first ergonomic language where I see the `Result` type in
>> action. `Result` is also used for nullable types.
>> ```
>
> I am also a fan of C3, done a medium size hobby project in C3
> (9K LOC). Though, I don't like the error handling feature in C3
> very much. I mean it's not bad, but it's not simple. I like
> Odin's simplicity.
Old forum post :)
Anyway, Odin just has multiple return values.
The C3 way is OK for basic things and I use something similar in
my [D
code](https://github.com/Kapendev/parin/blob/main/source/parin/joka/ascii.d#L913). It's a Maybe/Option type, but with an error code instead of a bool. I don't think you should make that part of your language, or do it the way C3 did, but ehh.
More information about the Digitalmars-d
mailing list