File Download
There are no files associated with this item.
Links for fulltext
(May Require Subscription)
- Scopus: eid_2-s2.0-67650046143
- WOS: WOS:000262035900026
- Find via
Supplementary
- Citations:
- Appears in Collections:
Article: The Visitor pattern as a reusable, generic, type-safe component
Title | The Visitor pattern as a reusable, generic, type-safe component |
---|---|
Authors | |
Keywords | Algebraic Datatypes Design Patterns Program Extensibility Software Components Traversal Visitor Pattern |
Issue Date | 2008 |
Citation | Acm Sigplan Notices, 2008, v. 43 n. 10, p. 439-456 How to Cite? |
Abstract | The 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 Identifier | http://hdl.handle.net/10722/188518 |
ISSN | 2020 SCImago Journal Rankings: 0.310 |
ISI Accession Number ID | |
References |
DC Field | Value | Language |
---|---|---|
dc.contributor.author | Oliveira, BCDS | en_US |
dc.contributor.author | Wang, M | en_US |
dc.contributor.author | Gibbons, J | en_US |
dc.date.accessioned | 2013-09-03T04:09:41Z | - |
dc.date.available | 2013-09-03T04:09:41Z | - |
dc.date.issued | 2008 | en_US |
dc.identifier.citation | Acm Sigplan Notices, 2008, v. 43 n. 10, p. 439-456 | en_US |
dc.identifier.issn | 1523-2867 | en_US |
dc.identifier.uri | http://hdl.handle.net/10722/188518 | - |
dc.description.abstract | The 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.language | eng | en_US |
dc.relation.ispartof | ACM SIGPLAN Notices | en_US |
dc.subject | Algebraic Datatypes | en_US |
dc.subject | Design Patterns | en_US |
dc.subject | Program Extensibility | en_US |
dc.subject | Software Components | en_US |
dc.subject | Traversal | en_US |
dc.subject | Visitor Pattern | en_US |
dc.title | The Visitor pattern as a reusable, generic, type-safe component | en_US |
dc.type | Article | en_US |
dc.identifier.email | Oliveira, BCDS: oliveira@comp.nus.edu.sg | en_US |
dc.identifier.authority | Oliveira, BCDS=rp01786 | en_US |
dc.description.nature | link_to_subscribed_fulltext | en_US |
dc.identifier.scopus | eid_2-s2.0-67650046143 | en_US |
dc.relation.references | http://www.scopus.com/mlt/select.url?eid=2-s2.0-67650046143&selection=ref&src=s&origin=recordpage | en_US |
dc.identifier.volume | 43 | en_US |
dc.identifier.issue | 10 | en_US |
dc.identifier.spage | 439 | en_US |
dc.identifier.epage | 456 | en_US |
dc.identifier.isi | WOS:000262035900026 | - |
dc.publisher.place | United States | en_US |
dc.identifier.scopusauthorid | Oliveira, BCDS=12239474400 | en_US |
dc.identifier.scopusauthorid | Wang, M=7406689641 | en_US |
dc.identifier.scopusauthorid | Gibbons, J=7201472851 | en_US |
dc.identifier.issnl | 1523-2867 | - |