Forwarded from Блог*
#prog #rust #article
Как известно, в Rust (почти) нет higher-ranked polymorphism. Тем не менее, иногда его можно эмулировать довольно простым образом.
leshow.github.io/post/cheat_rank_n
Как известно, в Rust (почти) нет higher-ranked polymorphism. Тем не менее, иногда его можно эмулировать довольно простым образом.
leshow.github.io/post/cheat_rank_n
Esoterically Typed
Cheating Higher Ranks with Traits
I ran into this a little while ago and thought it would be helpful to share a possible solution.
Imagine you have an enum that describes a set of possible branches, for each branch there is a type …
Imagine you have an enum that describes a set of possible branches, for each branch there is a type …