Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

are monads, or more specifically f# computational expressions, a form of aspect oriented programming?


f# workflow builders have methods other than bind and unit. They have hooks for lots of keywords. see Creating a New Type of Computation Expression.

share|improve this question
up vote 5 down vote accepted

To the extent that monads serve to isolate a generalized computation strategy from the specifics of its algorithm or implementation, they can be seen as a basis or theoretical foundation for AOP. I found an interesting paper called Monads as a theoretical foundation for AOP (PDF) that gives this idea a more thorough treatment.

share|improve this answer
ugh, am I going to have to learn scheme too? I already feel like I need to learn Haskell just to learn about functional programming. LOL. /end rant – Charles Lambert May 11 '11 at 22:40
Learning new languages is fun! – Rein Henrichs May 11 '11 at 22:45
After you have the first one down, yes. When you are trying to learn a new programming paradigm, one is enough. I will have to add, functional programming seems more 'natural' to me somehow. I'm starting to get frustrated with c# and what it can't do, the more I work with f#. – Charles Lambert May 11 '11 at 22:51
You only really need to grok the syntax to follow the examples. – Rein Henrichs May 11 '11 at 23:03
well I guess i need to spend an afternoon learning scheme, so i can 'grok the syntax' – Charles Lambert May 11 '11 at 23:10

for me it somewhat feels a bit like AOP. Classic example in my work is using a "log-Workflow" (better known as a state-monad with the state beeing a log-entry) for loging inside my F#-code to spare me from passing the log-object through every method-call. On the other hand "real" AOP doesn't need you to write log-code inside your methods at all (maybe some attributes). I don't like the "hey I rewrite your code for you"-AOP frameworks so I just use Unity-Injection from time to time (yes I really use Unity - does everything I want from it) and it's ok.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.