Design patterns for functional strategic programming

  • Authors:
  • Ralf Lämmel;Joost Visser

  • Affiliations:
  • Vrije Universiteit De Boelelaan 1081a NL-1081 HV Amsterdam The Netherlands;CWI, Amsterdam The Netherlands

  • Venue:
  • Proceedings of the 2002 ACM SIGPLAN workshop on Rule-based programming
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

We believe that design patterns can be an effective means of consolidating and communicating program construction expertise for functional programming, just as they have proven to be in object-oriented programming. The emergence of combinator libraries that develop a specific domain or programming idiom has intensified, rather than reduced, the need for design patterns.In previous work, we introduced the fundamentals and a supporting combinator library for functional strategic programming. This is an idiom for (general purpose) generic programming based on the notion of a functional strategy: a first-class generic function that can not only be applied to terms of any type, but which also allows generic traversal into subterms and can be customised with type-specific behaviour.This paper seeks to provide practising functional programmers with pragmatic guidance in crafting their own generic programs using functional strategies. To this end, we propose a novel description format for functional design patterns, and we initiate a catalogue of strategy design patterns. These design patterns aim at consolidating strategic programming expertise in accessible form.