Extensible programming with first-class cases
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
Thorn: robust, concurrent, extensible scripting on the JVM
Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
Grace: the absence of (inessential) difficulty
Proceedings of the ACM international symposium on New ideas, new paradigms, and reflections on programming and software
Matching objects with patterns
ECOOP'07 Proceedings of the 21st European conference on Object-Oriented Programming
Seeking grace: a new object-oriented language for novices
Proceeding of the 44th ACM technical symposium on Computer science education
Modules as gradually-typed objects
Proceedings of the 7th Workshop on Dynamic Languages and Applications
Proceedings of the 12th international conference on Generative programming: concepts & experiences
Hi-index | 0.00 |
Object orientation and pattern matching are often seen as conflicting approaches to program design. Object-oriented programs place type-dependent behavior inside objects and invoke it via dynamic dispatch, while pattern-matching programs place type-dependent behavior outside data structures and invoke it via multiway conditionals (case statements). Grace is a new, dynamic, object-oriented language designed to support teaching: to this end, Grace needs to support both styles. We explain how this conflict can be resolved gracefully: by modelling patterns and cases as partial functions, reifying those functions as objects, and then building up complex patterns from simpler ones using pattern combinators. We describe the implementation of this design as an object-oriented framework, and a case study of its effectiveness.