4 ms·
The problem is that making function signature errors optional effectively "colors" all the functions. If I want to write a function with errors in the signature
by zupa-hu 2y ago
The problem is that making function signature errors optional effectively "colors" all the functions. If I want to write a function with errors in the signature, then what if I call a function that doesn't have the error in the signature? In the presence of dynamic dispatch (ie. interfaces), the compiler can't infer the errors. Thus errors in function signatures can be required or not, but they can not be optional.
(Please point out any of my mistakes.)
- thornewolf 2y agoThis is a good callout. I don't have any disagreements but will have to think about this. Maybe my proposal is not reasonable for the reasons you provide.