Provide an example backing up your claim regarding pattern matching + union types:
> Like in the same way you might forget to write pattern matching code?
That is exactly what is being discussed. Why would the topic arbitrarily change? In case you have forgotten, my literal question/assertion was:
"How would you forget, exactly? Your tests are going to blow in your face should you ever leave out an entire feature from the implementation."
Go on, show us: How would you forget?
> Provide an example backing up your claim regarding pattern matching + union types:
Uh... Okay. Sure? Strange request, but here is an example in CrabLang that meets your ask:
let result = foo();
match result {
Ok(value) => println!("Result: {}", value),
}
There you go. I forgot to check the error.Like I said in the full comment that you quoted from, you'll soon recognize your forgetfulness once you apply your checks and balances, but for that brief moment in between it is possible to forget. It must be that way else it would be impossible to input the program. If that's what you think we're talking about... Why? And let me ask again like I did in the comment you quoted from: What is the significance of that? If you had carried that quote through you'd also see: "That's not a real problem." I stand by that. Why not you?
In your CrabLang example, you don't have warnings on (I assume they exist) for completion or whatever. There's still the Err case that should at least throw a warning for not being caught.
This https://go.dev/play/p/k8zDQj5knaj is what I envision you are talking about, but clearly that cannot be it. As you can see it loudly proclaims that I "forgot", making this forgetfulness idea you have come up with impossible. So, what it is that you actually have in mind?