What does aspect-oriented programming mean for functional programmers?

Aspect-Oriented Programming (AOP) aims at modularising crosscutting concerns that show up in software. The success of AOP has been almost viral and nearly all areas in Software Engineering and Programming Languages have become "infected" by the AOP bug in one way or another. Interestingly the functional programming community (and, in particular, the pure functional programming community) seems to be resistant to the pandemic. The goal of this paper is to debate the possible causes of the functional programming community's resistance and to raise awareness and interest by showcasing the benefits that could be gained from having a functional AOP language. At the same time, we identify the main challenges and explore the possible design-space.

[1]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[2]  James Cheney,et al.  A lightweight implementation of generics and dynamics , 2002, Haskell '02.

[3]  Xavier Leroy The objective caml system release 3 , 2001 .

[4]  Richard S. Bird The promotion and accumulation strategies in transformational programming , 1984, TOPL.

[5]  Bruno C. d. S. Oliveira,et al.  Modular Visitor Components , 2009, ECOOP.

[6]  Conor McBride,et al.  Applicative programming with effects , 2008, J. Funct. Program..

[7]  Alan Bundy,et al.  Constructing Induction Rules for Deductive Synthesis Proofs , 2006, CLASE.

[8]  Martin C. Rinard,et al.  A classification system and analysis for aspect-oriented programs , 2004, SIGSOFT '04/FSE-12.

[9]  Daniel P. Friedman,et al.  Aspect-Oriented Programming is Quantification and Obliviousness , 2000 .

[10]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[11]  Ralf Hinze,et al.  Open data types and open functions , 2006, PPDP '06.

[12]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[13]  Bruno C. d. S. Oliveira,et al.  TypeCase: a design pattern for type-indexed functions , 2005, Haskell '05.

[14]  Matthias Felleisen,et al.  Contracts for higher-order functions , 2002, ICFP '02.

[15]  Jacques Garrigue,et al.  Code reuse through polymorphic variants , 2000 .

[16]  Benedict R. Gaster,et al.  A Polymorphic Type System for Extensible Records and Variants , 1996 .

[17]  Friedrich Steimann The paradoxical success of aspect-oriented programming , 2006, OOPSLA '06.

[18]  Karl J. Lieberherr,et al.  Aspectual Collaborations: Combining Modules and Aspects , 2003, Comput. J..

[19]  Ralf Hinze,et al.  Typed Contracts for Functional Programming , 2006, FLOPS.

[20]  Martin Odersky,et al.  Extensible algebraic datatypes with defaults , 2001, ICFP '01.

[21]  William R. Cook,et al.  A denotational semantics of inheritance , 1989 .

[22]  Meng Wang,et al.  A Compilation Model for Aspect-Oriented Polymorphically Typed Functional Languages , 2007, SAS.

[23]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[24]  X. Leroy The Objective Caml system release 3.09 Documentation and user''s manual , 2005 .

[25]  Alexander A. Stepanov,et al.  Generic Programming , 1988, ISSAC.

[26]  Todd D. Millstein,et al.  Modular typechecking for hierarchically extensible datatypes and functions , 2002, ICFP '02.

[27]  Simon L. Peyton Jones,et al.  The Glasgow Haskell Compiler: A Retrospective , 1992, Functional Programming.

[28]  Meng Wang,et al.  Type-directed weaving of aspects for higher-order functional languages , 2006, PEPM '06.

[29]  RD(翻译) Composition 构好图,出好片 , 2010 .

[30]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[31]  Stephanie Weirich RepLib: a library for derivable type classes , 2006, Haskell '06.

[32]  Philip Wadler,et al.  How to make ad-hoc polymorphism less ad hoc , 1989, POPL '89.

[33]  Bertrand Meyer,et al.  Eiffel: The Language , 1991 .

[34]  David A. McAllester,et al.  Sound and complete models of contracts , 2006, Journal of Functional Programming.

[35]  David Walker,et al.  AspectML: A polymorphic aspect-oriented functional programming language , 2008, TOPL.

[36]  Bruno C. d. S. Oliveira Modular Visitor Components: A Practical Solution to the Expression Families Problem , 2009, ECOOP 2009.

[37]  Bruno C. d. S. Oliveira,et al.  Extensible and modular generics for the masses , 2006, Trends in Functional Programming.

[38]  Stephanie Weirich,et al.  Good advice for type-directed programming aspect-oriented programming and extensible generic functions , 2006, WGP '06.

[39]  Rémi Douence,et al.  Composition, reuse and interaction analysis of stateful aspects , 2004, AOSD '04.

[40]  Philip Wadler,et al.  Theorems for free! , 1989, FPCA.

[41]  Ralf Hinze,et al.  Generic programming in 3D , 2009, Sci. Comput. Program..

[42]  Ondrej Lhoták,et al.  abc: an extensible AspectJ compiler , 2005, AOSD '05.

[43]  Ralf Hinze,et al.  Generic Haskell: Practice and Theory , 2003, Generic Programming.

[44]  Shmuel Katz,et al.  Diagnosis of Harmful Aspects Using Regression Verification , 2004 .

[45]  Wouter Swierstra,et al.  Data types à la carte , 2008, Journal of Functional Programming.

[46]  Jonathan Aldrich,et al.  Open Modules: Modular Reasoning About Advice , 2005, ECOOP.

[47]  Roland Carl Backhouse,et al.  Generic Programming: Advanced Lectures , 2003 .

[48]  Gary T. Leavens,et al.  Observers and Assistants: A Proposal for Modular Aspect-Oriented Reasoning , 2002 .

[49]  Konstantin Läufer What Functional Programmers can Learn from the Visitor Pattern Technical Report , March 2003 , 2004 .

[50]  Stephanie Weirich,et al.  Generalizing parametricity using information-flow , 2005, 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05).

[51]  Ralf Hinze Generics for the masses , 2004, ICFP '04.

[52]  Simon L. Peyton Jones,et al.  Scrap your boilerplate: a practical design pattern for generic programming , 2003, TLDI '03.

[53]  Daan Leijen,et al.  Extensible records with scoped labels , 2005, Trends in Functional Programming.

[54]  Tarmo Uustalu,et al.  Comonadic Notions of Computation , 2008, CMCS.

[55]  Simon L. Peyton Jones,et al.  Scrap your boilerplate with class: extensible generic functions , 2005, ICFP '05.

[56]  Stephanie Weirich,et al.  Type-safe cast: (functional pearl) , 2000, ICFP '00.

[57]  David Walker,et al.  Harmless advice , 2006, POPL '06.

[58]  Johan Jeuring,et al.  Polytypic Programming , 1996, Advanced Functional Programming.

[59]  William R. Cook,et al.  Monadic Memoization Mixins , 2006 .

[60]  Akinori Yonezawa,et al.  Aspectual Caml: an aspect-oriented functional language , 2005, ICFP '05.

[61]  Bruno C. d. S. Oliveira,et al.  The Different Aspects of Monads and Mixins , 2009 .