Views: a way for pattern matching to cohabit with data abstraction
Views: a way for pattern matching to cohabit with data abstraction
复制标题
DOI:
10.1145/41625.41653
复制
发表时间:
1987-10
期刊:
影响因子:
--
通讯作者:
P. Wadler
中科院分区:
文献类型:
--
作者:
P. Wadler
Pattern matching and data abstraction are important concepts in designing programs, but they do not fit well together. Pattern matching depends on making public a free data type representation, while data abstraction depends on hiding the representation. This paper proposes the views mechanism as a means of reconciling this conflict. A view allows any type to be viewed as a free data type, thus combining the clarity of pattern matching with the efficiency of data abstraction.