On the relation of aspects and monads

  • Authors:
  • Christian Hofer;Klaus Ostermann

  • Affiliations:
  • Darmstadt University of Technology, Germany;Darmstadt University of Technology, Germany

  • Venue:
  • Proceedings of the 6th workshop on Foundations of aspect-oriented languages
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

The relation between aspects and monads is a recurring topic in discussions in the programming language community, although it has never been elaborated whether their resemblences are only superficial, and if not, where they are rooted. The aim of this paper is to contrast both mechanisms w.r.t. their capabilities and their effects on modularity, first by looking at monads as a way to express tangling concerns in functional programming and by discussing whether they can be regarded as a form of AOP, then by taking the view that monads express concerns of computations and by analyzing the extent to which aspects are able to handle those concerns. Our results are mostly negative: monads are not capable of quantifying over points in the program execution in a declarative way, whereas aspects are not very useful in abstracting over computational capabilities.