Go is built for grug brained programmers like me.
grug brain developer not so smart, but grug brain developer program many long year and learn some things although mostly still confused
Not a hard question. It’s sum types! (Or enums, tagged unions, or whatever you want to call them).
While you're at it, with sum types, you can replace this stupid nil with an optional type. Also, you can replace the stupid error handling with an either/result type. Then you can add a keyword to return early if it's left/err. Then you have Swift or Rust.
While you're at it, with sum types, you can replace this stupid nil with an optional type. Also, you can replace the stupid error handling with an either/result type. Then you can add a keyword to return early if it's left/err. Then you have Swift or Rust.