Category : pattern-matching

Recently there was a need to write a matching pattern for catching errors, which it actually copes with. But the only thing it lacks in comparison with the same switch is the opportunity to fallthrough. All my attempts to implement this feature have been unsuccessful. Initially, I thought about something like this: matcher(errcode) .match(SQLITE_MISUSE , ..

Read more