A Philosophy of Software Design

Kapendev alexandroskapretsos at gmail.com
Sun May 24 18:02:39 UTC 2026


On Sunday, 24 May 2026 at 17:15:12 UTC, Zz wrote:
> https://rm4n0s.github.io/posts/3-error-handling-challenge/
> It's an error code but in a tagged union with N cases.

The error to read a file in Odin:

```go
Error :: union {
   General_Error,
   io.Error,
   runtime.Allocator_Error,
   sys_windows.System_Error,
}
```

This has around 32 cases.
I think the idea is fine sometimes, but ehh.
Hard to tell what the error really is. Mostly an API issue in 
this case.



More information about the Digitalmars-d mailing list