Yes. It's done during compile time and trivial to do.
Changing the function signature is significantly harder. You'd either have to inline the function, evaluate the code, run optimizations to remove the Either wrapping or you can have a more specialize simple check and have two version of the function. One with the standard signature and one that doesn't use Either and modifies the function to not use it.
Having one function signature which you don't need to modify is significantly more simple than applying several optimizations to undo wrapping and not break anything
> think having min() return Either(int,error) is the way to go for most languages
What about languages that want to be efficient? It's much more efficient to use a int return value then to unwrap it. Efficiently is one of the main goals of this language (Efficiently, safety, syntax/readability)
I had several people ask if I could write a document of where the language is going and the goals of it however it might be a large read. I think a series of post each containing one idea would be more digestible. This is the first issue.
I think with the lifetime+ownership rules and certain features it will be easier to maintain large projects in this language. The compiler hasn't been optimized and it's pretty fast so I suspect the compile time will be a huge win. I think people working on backend servers will be the first to use Dio. It doesn't seem like any native languages "won" backend servers and it all belongs to garbage collected languages. I would love game developers to use Dio but I doubt that will happen until the language is stable enough to rewrite the compiler in Dio.
I never heard of JoJo until 2020 and people seem to love asking if this is a JoJo reference.
I'll be happy to answer any questions about the language.
This release has a syntax update. You no longer require to use backticks and you don't need a $ in front of a type. Static assert has been added as well as defer and errdefer. My favourite change is being able to destruct an object by calling a function so I can return it's internals without creating another object.
Changing the function signature is significantly harder. You'd either have to inline the function, evaluate the code, run optimizations to remove the Either wrapping or you can have a more specialize simple check and have two version of the function. One with the standard signature and one that doesn't use Either and modifies the function to not use it.
Having one function signature which you don't need to modify is significantly more simple than applying several optimizations to undo wrapping and not break anything