So while getting familiar with the oddities of GDScript i noticed that it really doesn't have much in way of handling errors as a language feature. So while most languages I'm familiar with use try-catch statements, there just isn't anything. I hate returning nulls or sentinel values from functions so... I took a page from Rust's design and implemented `Result`.
Now if I'm doing an operation where I would want to generate an error to notify the calling function you did something bad, I am in a more functional paradigm.
Attached is a unit test around some bit reading using the `Result` and a match function that will pass along either the value or error message as needed. Second picture is the match function, it is pretty simple. A great use case for Monads overall.
Trying to find information on error handling in GDScript lead to a lot of "Just don't write code with errors in it" advice... which is frankly unrealistic and unhinged. It is okay to admit a language has some missing features.