Managing `cast` performance penalty

Yes, I'm also impressed that match is so complicated that it becomes very difficult to directly annotate the type of the matched variable. This is why I basically only use #:when style now (as we discussed in Is it good style to use `#:when` instead of `?` in match expression?).

And in TR, match seems not to design a syntax for declaring types, types can only be declared through reader extension (although I rarely do this, but I think this is at least an example to illustrate the use of reader extension)

2 Likes