Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

What Kind of Use

What Kind of Use

Daerax
Journal · · 1 min read
1,190 0
I asked earlier what Type Constructor Polymorphism is useful for. I feel they are really useful when programming in a typeful and functional way. They are useful for writing flexible, better abstracted code and reduce code duplication. Once you start in that style it is painful to drop back down to mere generics.

Usually though, the combined power of increased flexibility while allowing static checking is not necessary since usually one works in only a few instances of the types they abstract over.

However in an imperative framework with reflection and some dynamic features they are not so needed. At the cost of safety and clear abstraction power.

Discussion

Loading comments...