You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current approach to this is not unprecedented. Consider the following Python example,
>>> s = "0/0"
>>> eval(s)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero
>>>
where we can construct a non-sensical computation as a string and pass it around without any consequences. It is only when we actually want to perform this computation that things blow up.
This situation is completely analogous to our pattern situation above, where we can construct a non-sensical pattern, pass it around etc, and things only blow up when we try to use it.
Since users are able to construct possibly error containing patters, we need to note in the documentation that things like:
are valid programs up until the pattern match is attempted on the last line. Note we have not defined
A
to be anything.The text was updated successfully, but these errors were encountered: