File Download

There are no files associated with this item.

  Links for fulltext
     (May Require Subscription)
Supplementary

Article: Scala for generic programmers: Comparing Haskell and Scala support for generic programming

TitleScala for generic programmers: Comparing Haskell and Scala support for generic programming
Authors
Issue Date2010
PublisherCambridge University Press. The Journal's web site is located at http://journals.cambridge.org/action/displayJournal?jid=JFP
Citation
Journal Of Functional Programming, 2010, v. 20 n. 3-4, p. 303-352 How to Cite?
AbstractDatatype-generic programming (DGP) involves parametrization of programs by the shape of data, in the form of type constructors such as list of. Most approaches to DGP are developed in pure functional programming languages such as Haskell. We argue that the functional object-oriented language Scala is in many ways a better choice. Not only does Scala provide equivalents of all the necessary functional programming features (such as parametric polymorphism, higher-order functions, higher-kinded type operations, and type-and constructor-classes), but it also provides the most useful features of object-oriented languages (such as subtyping, overriding, traditional single inheritance, and multiple inheritance in the form of traits). Common Haskell techniques for DGP can be conveniently replicated in Scala, whereas the extra expressivity provides some important additional benefits in terms of extensibility and reuse. We illustrate this by comparing two simple approaches in Haskell, pointing out their limitations and showing how equivalent approaches in Scala address some of these limitations. Finally, we present three case studies on how to implement in Scala real DGP approaches from the literature: Hinze's Generics for the Masses, Lmmel and Peyton Jones's Scrap your Boilerplate with Class, and Gibbons's Origami Programming. Copyright © 2010 Cambridge University Press.
Persistent Identifierhttp://hdl.handle.net/10722/188520
ISSN
2023 Impact Factor: 1.1
2023 SCImago Journal Rankings: 0.484
ISI Accession Number ID
References

 

DC FieldValueLanguage
dc.contributor.authorOliveira, BCDSen_US
dc.contributor.authorGibbons, Jen_US
dc.date.accessioned2013-09-03T04:09:42Z-
dc.date.available2013-09-03T04:09:42Z-
dc.date.issued2010en_US
dc.identifier.citationJournal Of Functional Programming, 2010, v. 20 n. 3-4, p. 303-352en_US
dc.identifier.issn0956-7968en_US
dc.identifier.urihttp://hdl.handle.net/10722/188520-
dc.description.abstractDatatype-generic programming (DGP) involves parametrization of programs by the shape of data, in the form of type constructors such as list of. Most approaches to DGP are developed in pure functional programming languages such as Haskell. We argue that the functional object-oriented language Scala is in many ways a better choice. Not only does Scala provide equivalents of all the necessary functional programming features (such as parametric polymorphism, higher-order functions, higher-kinded type operations, and type-and constructor-classes), but it also provides the most useful features of object-oriented languages (such as subtyping, overriding, traditional single inheritance, and multiple inheritance in the form of traits). Common Haskell techniques for DGP can be conveniently replicated in Scala, whereas the extra expressivity provides some important additional benefits in terms of extensibility and reuse. We illustrate this by comparing two simple approaches in Haskell, pointing out their limitations and showing how equivalent approaches in Scala address some of these limitations. Finally, we present three case studies on how to implement in Scala real DGP approaches from the literature: Hinze's Generics for the Masses, Lmmel and Peyton Jones's Scrap your Boilerplate with Class, and Gibbons's Origami Programming. Copyright © 2010 Cambridge University Press.en_US
dc.languageengen_US
dc.publisherCambridge University Press. The Journal's web site is located at http://journals.cambridge.org/action/displayJournal?jid=JFPen_US
dc.relation.ispartofJournal of Functional Programmingen_US
dc.titleScala for generic programmers: Comparing Haskell and Scala support for generic programmingen_US
dc.typeArticleen_US
dc.identifier.emailOliveira, BCDS: oliveira@comp.nus.edu.sgen_US
dc.identifier.authorityOliveira, BCDS=rp01786en_US
dc.description.naturelink_to_subscribed_fulltexten_US
dc.identifier.doi10.1017/S0956796810000171en_US
dc.identifier.scopuseid_2-s2.0-78650291787en_US
dc.relation.referenceshttp://www.scopus.com/mlt/select.url?eid=2-s2.0-78650291787&selection=ref&src=s&origin=recordpageen_US
dc.identifier.volume20en_US
dc.identifier.issue3-4en_US
dc.identifier.spage303en_US
dc.identifier.epage352en_US
dc.identifier.isiWOS:000286560000004-
dc.publisher.placeUnited Kingdomen_US
dc.identifier.scopusauthoridOliveira, BCDS=12239474400en_US
dc.identifier.scopusauthoridGibbons, J=7201472851en_US
dc.identifier.issnl0956-7968-

Export via OAI-PMH Interface in XML Formats


OR


Export to Other Non-XML Formats