|
|
|
|
|
by sixbrx
4093 days ago
|
|
I don't think anything's much orthogonal to partiality of functions in languages with strong type systems, unfortunately :) You wrote that array indexing is "a partial function from integers to the value set". If we're to take the suggestion seriously, then the practicality of it depends on how partial functions are represented in the language. Which itself is certainly not orthogonal to the Try-vs-exceptions issue. |
|
I was talking about the mechanism for array indexing. In both cases, indexing is function application. So the choice of error representation is orthogonal. This is even more evidence that we should not use a different operator for array indexing as Rust does alas.