Matches in SemOpenAlex for { <https://semopenalex.org/work/W2132186989> ?p ?o ?g. }
- W2132186989 abstract "Pattern matching is a programming language construct considered essential in functional programming. Its purpose is to inspect and decompose data. Instead, object-oriented programming languages do not have a dedicated construct for this purpose. A possible reason for this is that pattern matching is useful when data is defined separately from operations on the data – a scenario that clashes with the object-oriented motto of grouping data and operations. However, programmers are frequently confronted with situations where there is no alternative to expressing data and operations separately – because most data is neither stored in nor does it originate from an object-oriented context. Consequently, object-oriented programmers, too, are in need for elegant and concise solutions to the problem of decomposing data. To this end, we propose a built-in pattern matching construct compatible with object-oriented programming. We claim that it leads to more concise and readable code than standard object-oriented approaches. A pattern in our approach is any computable way of testing and deconstructing an object and binding relevant parts to local names. We introduce pattern matching in two variants, case classes and extractors. We compare the readability, extensibility and performance of built-in pattern matching in these two variants with standard decomposition techniques. It turns out that standard object-oriented approaches to decomposing data are not extensible. Case classes, which have been studied before, require a low notational overhead, but expose their representation, making them hard to change later. The novel extractor mechanism offers loose coupling and extensibility, but comes with a performance overhead. We present a formalization of object-oriented pattern matching with extractors. This is done by giving definitions and proving standard properties for a calculus that provides pattern matching as described before. We then give a formal, optimizing translation from the calculus including pattern matching to its fragment without pattern matching, and prove it correct. Finally, we consider non-obvious interactions between the pattern matching and parametric polymorphism. We review the technique of generalized algebraic data types from functional programming, and show how it can be carried over to the object-oriented style. The main tool is the extension of the type system with subtype constraints, which leads to a very expressive metatheory. Through this theory, we are able to express patterns that operate on existentially quantified types purely by universally quantified extractors." @default.
- W2132186989 created "2016-06-24" @default.
- W2132186989 creator A5066761816 @default.
- W2132186989 date "2007-01-01" @default.
- W2132186989 modified "2023-09-23" @default.
- W2132186989 title "Object-oriented pattern matching" @default.
- W2132186989 cites W106036673 @default.
- W2132186989 cites W1496155669 @default.
- W2132186989 cites W1501891810 @default.
- W2132186989 cites W1507723317 @default.
- W2132186989 cites W1510878057 @default.
- W2132186989 cites W1527327679 @default.
- W2132186989 cites W1543641760 @default.
- W2132186989 cites W1544633123 @default.
- W2132186989 cites W1573426382 @default.
- W2132186989 cites W1583295953 @default.
- W2132186989 cites W1583597026 @default.
- W2132186989 cites W1586902756 @default.
- W2132186989 cites W1588812554 @default.
- W2132186989 cites W1595372275 @default.
- W2132186989 cites W1595544871 @default.
- W2132186989 cites W1596289178 @default.
- W2132186989 cites W159715351 @default.
- W2132186989 cites W1597362145 @default.
- W2132186989 cites W1606121052 @default.
- W2132186989 cites W1765915613 @default.
- W2132186989 cites W1811907079 @default.
- W2132186989 cites W1827112781 @default.
- W2132186989 cites W1829244603 @default.
- W2132186989 cites W1834355065 @default.
- W2132186989 cites W1970376748 @default.
- W2132186989 cites W1973054120 @default.
- W2132186989 cites W1974398164 @default.
- W2132186989 cites W1977140313 @default.
- W2132186989 cites W1982866418 @default.
- W2132186989 cites W1984514567 @default.
- W2132186989 cites W1987203566 @default.
- W2132186989 cites W2000785911 @default.
- W2132186989 cites W2003507527 @default.
- W2132186989 cites W2011941456 @default.
- W2132186989 cites W2012968289 @default.
- W2132186989 cites W2014294283 @default.
- W2132186989 cites W2026557621 @default.
- W2132186989 cites W2029360780 @default.
- W2132186989 cites W2035731741 @default.
- W2132186989 cites W2057405511 @default.
- W2132186989 cites W2069037543 @default.
- W2132186989 cites W2090855107 @default.
- W2132186989 cites W2093036100 @default.
- W2132186989 cites W2093737074 @default.
- W2132186989 cites W2094945667 @default.
- W2132186989 cites W2098884586 @default.
- W2132186989 cites W2104204098 @default.
- W2132186989 cites W2109795737 @default.
- W2132186989 cites W2111151482 @default.
- W2132186989 cites W2112632506 @default.
- W2132186989 cites W2114980032 @default.
- W2132186989 cites W2115472920 @default.
- W2132186989 cites W2126234902 @default.
- W2132186989 cites W2133546079 @default.
- W2132186989 cites W2137417304 @default.
- W2132186989 cites W2138247393 @default.
- W2132186989 cites W2138964563 @default.
- W2132186989 cites W2140647971 @default.
- W2132186989 cites W2141059677 @default.
- W2132186989 cites W2141384558 @default.
- W2132186989 cites W2142329765 @default.
- W2132186989 cites W2144015080 @default.
- W2132186989 cites W2145044561 @default.
- W2132186989 cites W2147125687 @default.
- W2132186989 cites W2150101804 @default.
- W2132186989 cites W2151384546 @default.
- W2132186989 cites W2154717882 @default.
- W2132186989 cites W2158107019 @default.
- W2132186989 cites W2159709550 @default.
- W2132186989 cites W2161064529 @default.
- W2132186989 cites W2161973496 @default.
- W2132186989 cites W2162525339 @default.
- W2132186989 cites W2164474969 @default.
- W2132186989 cites W2308470703 @default.
- W2132186989 cites W2622427009 @default.
- W2132186989 cites W2752885492 @default.
- W2132186989 cites W2913261834 @default.
- W2132186989 cites W2914943882 @default.
- W2132186989 cites W2968743833 @default.
- W2132186989 cites W3127823229 @default.
- W2132186989 cites W3136149908 @default.
- W2132186989 cites W3145846323 @default.
- W2132186989 doi "https://doi.org/10.5075/epfl-thesis-3899" @default.
- W2132186989 hasPublicationYear "2007" @default.
- W2132186989 type Work @default.
- W2132186989 sameAs 2132186989 @default.
- W2132186989 citedByCount "3" @default.
- W2132186989 countsByYear W21321869892013 @default.
- W2132186989 crossrefType "journal-article" @default.
- W2132186989 hasAuthorship W2132186989A5066761816 @default.
- W2132186989 hasConcept C105795698 @default.
- W2132186989 hasConcept C154945302 @default.
- W2132186989 hasConcept C165064840 @default.
- W2132186989 hasConcept C199360897 @default.