2 ms·
To generate a more helpful error message in this case, you could just look at the arguments to the list type to check if they are values or other types. In the
by peterkelly 6y ago
To generate a more helpful error message in this case, you could just look at the arguments to the list type to check if they are values or other types. In the case of list[1, 2, 3, 4] it should be straightforward for the error reporting mechanism to see that these are values and based on that, suggest list(1, 2, 3, 4).
I don't see type annotations as adding a fundamental difficulty to the sorts of error reporting described in the article, just something which makes it a bit more challenging to achieve.