Open and Closed Worlds for Overloading: a Definition and Support for Coexistence

dc.creatorCamarão,Carlos
dc.creatorVasconcellos,Cristiano
dc.creatorFigueiredo,Lucília
dc.creatorNicola,João
dc.date2007
dc.date.accessioned2024-02-06T12:55:33Z
dc.date.available2024-02-06T12:55:33Z
dc.descriptionThe type system of Haskell and some related systems are based on an open world approach for overloading. In an open world, the principal type of each overloaded symbol must be explicitly annotated (in Haskell, annotations occur in type class declarations) and a definition of an overloaded symbol is required to exist only when overloading is resolved. In a closed world, on the other hand, each principal type is determined according to the types of definitions that exist in the relevant context and, furthermore, overloading resolution for an expression considers only the context of the definition of its constituent symbols. In this paper we formally characterize open and closed worlds, and discuss their relative advantages. We present a type system that supports both approaches together, and compare the defined system with Haskell type classes extended with multi-parameter type classes and functional dependencies. We show in particular that functional dependencies are not necessary in order to support multi-parameter type classes, and present an alternative route.
dc.formattext/html
dc.identifierhttps://doi.org/10.3217/jucs-013-06-0874
dc.identifierhttps://lib.jucs.org/article/28814/
dc.identifier.urihttps://openrepository.mephi.ru/handle/123456789/9386
dc.languageen
dc.publisherJournal of Universal Computer Science
dc.relationinfo:eu-repo/semantics/altIdentifier/eissn/0948-6968
dc.relationinfo:eu-repo/semantics/altIdentifier/pissn/0948-695X
dc.rightsinfo:eu-repo/semantics/openAccess
dc.rightsJ.UCS License
dc.sourceJUCS - Journal of Universal Computer Science 13(6): 874-890
dc.subjecttype system
dc.subjecttype inference
dc.subjectconstrained polymorphism
dc.subjectclosed and open world approaches for overloading
dc.titleOpen and Closed Worlds for Overloading: a Definition and Support for Coexistence
dc.typeResearch Article
Файлы