This page is no longer maintained — Please continue to the home page at www.scala-lang.org

On Monads, Effectualness and Algebraic Structures

4 replies
loverdos
Joined: 2008-11-18,
User offline. Last seen 2 years 27 weeks ago.

Dear Scalars, [Vectors, Tensors, Spinors,]

It just happens that once a while I am reflecting on the ideas behind
monads and the likes. Recently, the concept of effects and their
interplay with the monad notion came to mind. I have the impression
that reading a great deal of functional/haskell-related tutorials/
papers/explanations one gets the picture that in order to do effects,
monads are one's vehicle. Or, to state it differently, monads have
been used/invented/(borrowed from Category Theory) to model effects
under a functional setting, to cleanly embed effects in a greater
purely functional system. This is the great contribution.

But then, under a wholly (and holy) "dirty" OOP setting, what is the
use/essence of monads? One gets, there, effects for free. Is it a
theoretical need (which by the way is not showing anywhere in current
systems, at least to the best of my knowledge) that will lead to a
better modeling/understanding of "uncontrolled" computations?

[Buts let us momentarily forget about the OO in OOP and the F in FP
and just concentrate on the P.]

Could we be close to the realization that (algebraic) structures are
beginning to play a more and more fundamental role in modeling
computation/programming? That they are emerging as the new kind of
"patterns", which will guide us to a more compositional programming/
computational future?

Thinking Aloud,
BR
Christos

Raoul Duke
Joined: 2009-01-05,
User offline. Last seen 42 years 45 weeks ago.
Re: On Monads, Effectualness and Algebraic Structures

> theoretical need (which by the way is not showing anywhere in current
> systems, at least to the best of my knowledge) that will lead to a better
> modeling/understanding of "uncontrolled" computations?

i think it depends on how picky / careful you are. haskell kinds
forces all devs to be picky. some people like to be picky even in
languages that don't require it.

sincerely.

Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: On Monads, Effectualness and Algebraic Structures
Dear Christos,

Excellent questions! Have you see this blog post of mine?

Best wishes,

--greg

On Mon, Sep 21, 2009 at 2:39 PM, Christos KK Loverdos <loverdos [at] gmail [dot] com> wrote:
Dear Scalars, [Vectors, Tensors, Spinors,]

It just happens that once a while I am reflecting on the ideas behind monads and the likes. Recently, the concept of effects and their interplay with the monad notion came to mind. I have the impression that reading a great deal of functional/haskell-related tutorials/papers/explanations one gets the picture that in order to do effects, monads are one's vehicle. Or, to state it differently, monads have been used/invented/(borrowed from Category Theory) to model effects under a functional setting, to cleanly embed effects in a greater purely functional system. This is the great contribution.

But then, under a wholly (and holy) "dirty" OOP setting, what is the use/essence of monads? One gets, there, effects for free. Is it a theoretical need (which by the way is not showing anywhere in current systems, at least to the best of my knowledge) that will lead to a better modeling/understanding of "uncontrolled" computations?

[Buts let us momentarily forget about the OO in OOP and the F in FP and just concentrate on the P.]

Could we be close to the realization that (algebraic) structures are beginning to play a more and more fundamental role in modeling computation/programming? That they are emerging as the new kind of "patterns", which will guide us to a more compositional programming/computational future?

Thinking Aloud,
BR
Christos
loverdos
Joined: 2008-11-18,
User offline. Last seen 2 years 27 weeks ago.
Re: On Monads, Effectualness and Algebraic Structures
Dear Greg,
I am reading your post right now and before finishing it I have the need to confess that it is great!
So algebras/structures  _are gaining a more conscious role_... Precisely  that is the essence, IMHO; to understand, to "feel" if you like, that we need to have them into the game. Maybe one day they become the game, but all that lies ahead.
Best RegardsChristos 
On Sep 22, 2009, at 01:58, Meredith Gregory wrote:
Dear Christos,

Excellent questions! Have you see this blog post of mine?

Best wishes,

--greg

On Mon, Sep 21, 2009 at 2:39 PM, Christos KK Loverdos <loverdos [at] gmail [dot] com> wrote:
Dear Scalars, [Vectors, Tensors, Spinors,]

It just happens that once a while I am reflecting on the ideas behind monads and the likes. Recently, the concept of effects and their interplay with the monad notion came to mind. I have the impression that reading a great deal of functional/haskell-related tutorials/papers/explanations one gets the picture that in order to do effects, monads are one's vehicle. Or, to state it differently, monads have been used/invented/(borrowed from Category Theory) to model effects under a functional setting, to cleanly embed effects in a greater purely functional system. This is the great contribution.

But then, under a wholly (and holy) "dirty" OOP setting, what is the use/essence of monads? One gets, there, effects for free. Is it a theoretical need (which by the way is not showing anywhere in current systems, at least to the best of my knowledge) that will lead to a better modeling/understanding of "uncontrolled" computations?

[Buts let us momentarily forget about the OO in OOP and the F in FP and just concentrate on the P.]

Could we be close to the realization that (algebraic) structures are beginning to play a more and more fundamental role in modeling computation/programming? That they are emerging as the new kind of "patterns", which will guide us to a more compositional programming/computational future?

Thinking Aloud,
BR
Christos
--
  __~O
 -\ <,       Christos KK Loverdos
(*)/ (*)      http://ckkloverdos.com









--
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

-- 
   __~O
  -\ <,       Christos KK Loverdos
(*)/ (*)      http://ckkloverdos.com





Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: On Monads, Effectualness and Algebraic Structures
Dear Christos,

Many thanks for the feedback. i agree that one day they become (part of) the game. We can and have to go much deeper. Monad is the new object. That means that composition of monad and monad, comonad and comonad, and monad and comonad are all extremely interesting situations. To get the right properties one needs distributive laws and other things. Internalizing how all this manifests in practical computing situations is going to take a lot of work. Beyond that there is a role to play for adjunction and Beck's theorem, but i don't yet understand that.

And beyond that i'm still highly unconvinced of the internal coherence of category theory itself. There are two strikes against category theory.
  • When you use it as it's own meta-theory what you get is entirely too heavy weight. Moreover, this exercise ought to sort out which of the multitude of definitions of N-category are compelling and useful. It doesn't.
  • When you use it in Curry-Howard style treatment of concurrency (processes are morphisms) the notion of categorical composition does not line up well with concurrent composition. So, you end up with models that are again too heavy weight.
In short, theory needs to be guided by practice as much as the other way around.

Best wishes,

--greg

On Tue, Sep 22, 2009 at 3:31 AM, Christos KK Loverdos <loverdos [at] gmail [dot] com> wrote:
Dear Greg,
I am reading your post right now and before finishing it I have the need to confess that it is great!
So algebras/structures  _are gaining a more conscious role_... Precisely  that is the essence, IMHO; to understand, to "feel" if you like, that we need to have them into the game. Maybe one day they become the game, but all that lies ahead.
Best RegardsChristos 
On Sep 22, 2009, at 01:58, Meredith Gregory wrote:
Dear Christos,

Excellent questions! Have you see this blog post of mine?

Best wishes,

--greg

On Mon, Sep 21, 2009 at 2:39 PM, Christos KK Loverdos <loverdos [at] gmail [dot] com> wrote:
Dear Scalars, [Vectors, Tensors, Spinors,]

It just happens that once a while I am reflecting on the ideas behind monads and the likes. Recently, the concept of effects and their interplay with the monad notion came to mind. I have the impression that reading a great deal of functional/haskell-related tutorials/papers/explanations one gets the picture that in order to do effects, monads are one's vehicle. Or, to state it differently, monads have been used/invented/(borrowed from Category Theory) to model effects under a functional setting, to cleanly embed effects in a greater purely functional system. This is the great contribution.

But then, under a wholly (and holy) "dirty" OOP setting, what is the use/essence of monads? One gets, there, effects for free. Is it a theoretical need (which by the way is not showing anywhere in current systems, at least to the best of my knowledge) that will lead to a better modeling/understanding of "uncontrolled" computations?

[Buts let us momentarily forget about the OO in OOP and the F in FP and just concentrate on the P.]

Could we be close to the realization that (algebraic) structures are beginning to play a more and more fundamental role in modeling computation/programming? That they are emerging as the new kind of "patterns", which will guide us to a more compositional programming/computational future?

Thinking Aloud,
BR
Christos
--
  __~O
 -\ <,       Christos KK Loverdos
(*)/ (*)      http://ckkloverdos.com









--
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

-- 
   __~O
  -\ <,       Christos KK Loverdos
(*)/ (*)      http://ckkloverdos.com








--
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland