Semantic pattern matching, useful or not?

Old topic but right now I have several patterns in a case and would be nice to have extractors, maybe it should be possible using pattern functions which returns true if they match in a cond expression, but without the extract part.

I miss semantic pattern match at this point. Let’s see how to solve it in a elegant way.

Hi, I found this discussion thread after asking a similar question on reddit, linked here: Reddit - Dive into anything

I, too, am interested in what is being referred to as "semantic patterns.’ I think it is worthwhile to pattern match on properties of the data instead of directly on the internal representation of data. There are use cases in which you want the internal representation to be hidden from the library user, but doing so disallows pattern matching in function heads, which is an essential part of using GenServer handle_* callbacks.