|
Boost : |
Subject: Re: [boost] Monad (was: Re: [Boost-users] [afio] Formal review of Boost.AFIO)
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-08-25 08:53:31
On 25 Aug 2015 at 0:41, Sam Kellett wrote:
> > Personally speaking I would doubt there will ever be a full fat
> > haskell type monad in common C++ programming. The cost benefit isn't
> > there for C++ 14 or C++ 1z as it is currently defined. There has been
> > a big trend towards simpler, less compile time heavy library
> > primitives in recent years, and until I am proven wrong that rules
> > out full fat Haskell type monads in C++.
> >
> > Maybe some future C++ language edition with much improved tooling
> > might make it work, but that's a 2020s thing minimum.
> >
>
> i'm not sure i see where the complexity comes from.
Anyone can implement a monadic C++ programming library, and there are
quite a few excellent implementations on github.
The complexity comes in getting a large code base which makes
extensive use of monads to compile quickly and ideally not bloat the
binary and be easy to understand in the debugger. I wanted just
enough monad for my needs, no more. Call it monad-lite if you want.
Monad compiles very quickly indeed in debug, adds virtually no
overhead to either runtime or binary size and is very easy to
understand in the debugger.
Those tick the boxes I was looking for. I think you have different
boxes you want to tick.
Niall
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk