Pattern Matching in Encore

University essay from Uppsala universitet/Institutionen för informationsteknologi

Author: Gustav Lundin; [2016]

Keywords: ;

Abstract: Encore is a young object-oriented programming language. The standard object-oriented model which embraces encapsulation works well for many kinds of problems but not all; it does not perform well when the algorithm inherently demands many objects to be decomposed at once. To address the need for an elegant way to write programs that solve such problems we have extended Encore with a pattern matching construct capable of decomposing objects. This thesis recounts how we designed and implemented pattern matching in Encore and presents some examples of how it can be used. We found that for problems that are not well suited for fully encapsulated objects, pattern matching leads to much more concise and clean code. However, this comes at the cost of additional run-time.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)