File Download

There are no files associated with this item.

  Links for fulltext
     (May Require Subscription)
Supplementary

Article: The Visitor pattern as a reusable, generic, type-safe component

TitleThe Visitor pattern as a reusable, generic, type-safe component
Authors
KeywordsAlgebraic Datatypes
Design Patterns
Program Extensibility
Software Components
Traversal
Visitor Pattern
Issue Date2008
Citation
Acm Sigplan Notices, 2008, v. 43 n. 10, p. 439-456 How to Cite?
AbstractThe Visitor design pattern shows how to separate the structure of an object hierarchy from the behaviour of traversals over that hierarchy. The pattern is very flexible; this very flexibility makes it difficult to capture the pattern as anything more formal than prose, pictures and prototypes. We show how to capture the essence of the Visitor pattern as a reusable software library, by using advanced type system features appearing in modern object-oriented languages such as Scala. We preserve type-safety statically and modularly: no reflection or similar mechanisms are used and modules can be independently compiled. The library is generic, in two senses: not only is it parametrised by both the return type and the shape of the object hierarchy, but also it allows a number of implementation choices (internal versus external control, imperative versus functional behaviour, orthogonal aspects such as tracing and memoisation) to be specified by parameters rather than fixed in early design decisions. Finally, we propose a generalised datatype-like notation, on top of our visitor library: this provides a convenient functional decomposition style in object-oriented languages. Copyright © 2008 ACM.
Persistent Identifierhttp://hdl.handle.net/10722/188518
ISSN
2015 SCImago Journal Rankings: 0.490
References

 

DC FieldValueLanguage
dc.contributor.authorOliveira, BCDSen_US
dc.contributor.authorWang, Men_US
dc.contributor.authorGibbons, Jen_US
dc.date.accessioned2013-09-03T04:09:41Z-
dc.date.available2013-09-03T04:09:41Z-
dc.date.issued2008en_US
dc.identifier.citationAcm Sigplan Notices, 2008, v. 43 n. 10, p. 439-456en_US
dc.identifier.issn1523-2867en_US
dc.identifier.urihttp://hdl.handle.net/10722/188518-
dc.description.abstractThe Visitor design pattern shows how to separate the structure of an object hierarchy from the behaviour of traversals over that hierarchy. The pattern is very flexible; this very flexibility makes it difficult to capture the pattern as anything more formal than prose, pictures and prototypes. We show how to capture the essence of the Visitor pattern as a reusable software library, by using advanced type system features appearing in modern object-oriented languages such as Scala. We preserve type-safety statically and modularly: no reflection or similar mechanisms are used and modules can be independently compiled. The library is generic, in two senses: not only is it parametrised by both the return type and the shape of the object hierarchy, but also it allows a number of implementation choices (internal versus external control, imperative versus functional behaviour, orthogonal aspects such as tracing and memoisation) to be specified by parameters rather than fixed in early design decisions. Finally, we propose a generalised datatype-like notation, on top of our visitor library: this provides a convenient functional decomposition style in object-oriented languages. Copyright © 2008 ACM.en_US
dc.languageengen_US
dc.relation.ispartofACM SIGPLAN Noticesen_US
dc.subjectAlgebraic Datatypesen_US
dc.subjectDesign Patternsen_US
dc.subjectProgram Extensibilityen_US
dc.subjectSoftware Componentsen_US
dc.subjectTraversalen_US
dc.subjectVisitor Patternen_US
dc.titleThe Visitor pattern as a reusable, generic, type-safe componenten_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.scopuseid_2-s2.0-67650046143en_US
dc.relation.referenceshttp://www.scopus.com/mlt/select.url?eid=2-s2.0-67650046143&selection=ref&src=s&origin=recordpageen_US
dc.identifier.volume43en_US
dc.identifier.issue10en_US
dc.identifier.spage439en_US
dc.identifier.epage456en_US
dc.publisher.placeUnited Statesen_US
dc.identifier.scopusauthoridOliveira, BCDS=12239474400en_US
dc.identifier.scopusauthoridWang, M=7406689641en_US
dc.identifier.scopusauthoridGibbons, J=7201472851en_US

Export via OAI-PMH Interface in XML Formats


OR


Export to Other Non-XML Formats