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 majority of cases of unreachable within this codebase are not correct and introduce undefined behaviour upon failure which is catastrophic for consumers of this library as if any of the operations fail the program could do anything (even play a game of tetris or fire all missiles). If the intent was to @panic() then such should be done explicitly or where the user should handle error, an error union.
Yes you're right. I did end up using catch unreachable a bit too liberally while prototyping and forgot to remove them when commiting. Over time.. it accumulates
https://github.com/search?q=repo%3Acapy-ui%2Fcapy%20unreachable&type=code
The majority of cases of
unreachable
within this codebase are not correct and introduce undefined behaviour upon failure which is catastrophic for consumers of this library as if any of the operations fail the program could do anything (even play a game of tetris or fire all missiles). If the intent was to@panic()
then such should be done explicitly or where the user should handle error, an error union.https://ziglang.org/documentation/master/#unreachable
https://ziglang.org/documentation/master/#Reaching-Unreachable-Code
Additional reading:
The text was updated successfully, but these errors were encountered: