[OT] Error handling in C3 language

swrwer mineapkhub at gmail.com
Sat Nov 29 16:45:14 UTC 2025


On Wednesday, 19 November 2025 at 12:58:43 UTC, user1234 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.
>> ```
>> // Function returning an Optional
>> fn int? maybe_func() { /* ... */ }
>>
>> fn void? test()
>> {
>> 	// ❌ This will be a compile error
>> 	// maybe_function() returns an Optional
>> 	// and 'bar' is not declared Optional:
>> 	// int bar = maybe_function();
>>
>> 	int bar = maybe_function()!;
>> 	// ✅ The above is equivalent to:
>> 	// int? temp = maybe_function();
>> 	// if (catch excuse = temp) return excuse?;
>>
>> 	// Now temp is unwrapped to a non-Optional
>> 	int bar = temp; // ✅ This is OK
>> }
>> ```
>> But striving to be evolution of C, faults look like error code 
>> singletons and apparently don't carry much information.
>
> Slightly related, if I've followed correctly the yesterday 
> cloudflare outage was cause because a Result value was 
> unwrapped without actually checking if it's valid.
>
> https://www.reddit.com/r/rust/comments/1p0susm/cloudflare_outage_on_november_18_2025_caused_by/

There, I have a solution to all your latest Minecraft APK 
problems with Minecraft APK download. This latest apk version of 
new minecraft update offers interesting features with unlocked 
all pro features. <a href="https://mineapkhub.com/">minecraft 
indir apk son sürüm</a> with interesting and latest features so 
users love the app.


More information about the Digitalmars-d mailing list