|
|
Subscribe / Log in / New account

touting polymorphism

touting polymorphism

Posted Feb 27, 2014 12:20 UTC (Thu) by HelloWorld (guest, #56129)
Parent article: Distribution quote of the week

Whether polymorphism is useful depends on what one wants to do. Often people would be better served with sum types (aka algebraic data types), pattern matching and exhaustiveness checks. Unfortunately, sum types haven't caught on nearly as much as product types (aka tuples/structs).
An interesting perspective is cast on the advantages and disadvantages of sum types and polymorphism respectively by the expression problem:
http://en.wikipedia.org/wiki/Expression_problem


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds