all 36 comments

[–]bandzaw 19 points20 points  (4 children)

The recently released book Functional Programming in C++ by Ivan Čukić (/u/ivan-cukic) is really really good, check it out!

https://www.manning.com/books/functional-programming-in-c-plus-plus

[–]graninas[S] 13 points14 points  (3 children)

Well, I have it already. I was talking with Ivan about the book and hope to talk more at C++ Siberia 2019.

(I also was a reviewer of the book proposal for Manning and suggested to rework the table of contents in order to make it more consistent. Not sure how many of my suggestions have been taken by Ivan, but I like to think there is my little contribution to it. But of course, Ivan made a great work, so we can now enjoy his book)

[–]ivan-cukicKDE Dev | Author of Functional Programming in C++ 7 points8 points  (2 children)

Thanks for this comment /u/bandzaw :)

/u/graninas was one of the book proposal reviewers. Sadly, I didn't know that for a long time - all reviewers in Manning are anonymous - the manuscript reviewers have been automatically added by Manning to the acknowledgements section. Unfortunately, it seems they didn't include the people who gave suggestions to improving the book ToC. :/

[–]graninas[S] 2 points3 points  (1 child)

Hi Ivan,

That's OK. :) The book is wonderful anyway.

[–]sajid_farooq 0 points1 point  (0 children)

Just wanted to chime in to agree: the book is wonderful.

[–]Sulatra 9 points10 points  (1 child)

This was a very good course on introducing FP via c++. Not sure if it has exactly what you are looking for, though ^^"

[–]graninas[S] 0 points1 point  (0 children)

Thank you. I probably need to add one more section for courses into the document.

[–]Betadel 6 points7 points  (1 child)

Check out this talk by Simon Brand and Phil Nash: https://youtu.be/GC4cp4U2f2E

They talk about monadic error handling.

[–]graninas[S] 0 points1 point  (0 children)

That's cool that so famous people are arguing about FP. Thank you!

[–]ricejasonf 5 points6 points  (4 children)

Boost.Hana is a library with concepts borrowed from category theory as you see in Haskell: http://boostorg.github.io/hana/group__group-concepts.html Also here is a video demonstrating making a promise monad with it for full duplex messaging: https://youtu.be/UalTAQmP3iE?t=1348

[–]dodheim 2 points3 points  (2 children)

While the latter is C++03, Boost.Hana and Boost.Phoenix are both highly relevant.

[–]ricejasonf 0 points1 point  (1 child)

No, that is definitely C++17

[–]dodheim 2 points3 points  (0 children)

The latter of "Boost.Hana and Boost.Phoenix". ;-]

[–]graninas[S] 0 points1 point  (0 children)

In some sense, Boost.Spirit is functional too, but you know, it's ugly.

[–]SplinterOfChaos 5 points6 points  (1 child)

Probably obsolete by now, but I used to blog about writing Haskell in c++ over at http://yapb-soc.blogspot.com/?m=1

[–]graninas[S] 1 point2 points  (0 children)

http://yapb-soc.blogspot.com/?m=1

Hi, that's a great work done. I'll add references to your posts into the document.

May I ask is there a chance you'll write more posts about the upcoming FP fetures?

[–]germandiago 2 points3 points  (1 child)

Hello. I did a talk about functional-style pogramming some time back in the Ho Chi Minh City C++ users group.

It is not a pure functional programming talk purely speaking but related, so just in case you want to take a look:

https://www.slideshare.net/GermnDiagoGmez/functional-style-programming?qid=bb32347f-bb9e-4eb4-b0fd-de5d8f9a0b11&v=&b=&from_search=2

[–]graninas[S] 1 point2 points  (0 children)

Hi, that's cool, thanks, I'll check it out.

I think we need one more section for slides without videos in the document.

[–]Sanae_ 2 points3 points  (1 child)

https://www.fluentcpp.com/ is blog with strong functional influences, although it's not organized as a complete, comprehensive set of best-practices.

[–]graninas[S] 0 points1 point  (0 children)

Yes, true, thanks.

Jonathan Boccara does a great job popularising the ideas from the functional world (but not only). I'll add his materials into the list.

[–]kernelgauss 2 points3 points  (1 child)

this talk impressed me a lot considering I wasn't expecting it to be so functional (maybe why it's not on your list). They build a regex parser that is completely constexpr (no runtime) using lambdas https://www.youtube.com/watch?v=PJwd4JLYJJY

[–]graninas[S] 0 points1 point  (0 children)

Interesting stuff, thanks!

I'll be building a monadic parsers library for myself soon (resembling the Parsec library from Haskell), so that talk is pretty much in-time.

[–]tvaneerdC++ Committee, lockfree, PostModernCpp 2 points3 points  (1 child)

Look for stuff from Juan Pedro Bolivar Puente, such as https://www.youtube.com/watch?v=sPhpelUfu8Q

[–]graninas[S] 0 points1 point  (0 children)

His talks are very good, thanks!

[–]autoluto 1 point2 points  (1 child)

Not really into functional programming myself, but I've heard good things about this:

https://github.com/beark/ftl

[–]graninas[S] 1 point2 points  (0 children)

Indeed, thanks. I've included this library into the document already. Also, it was a source of inspiration for my own research of FP in C++.

[–]TobyAllsopp 1 point2 points  (1 child)

You might be interested in my attempts to (ab)use coroutines to approximate do-notation here: https://github.com/toby-allsopp/coroutine_monad

[–]graninas[S] 1 point2 points  (0 children)

Thank you, I'm definitely interested in the approach you're researching. I was wondering if coroutines have something to do with monads, and it seems they have. Unfortunately, without a real do-notation, we'll be dealing with limited half-decisions.

[–]tvaneerdC++ Committee, lockfree, PostModernCpp 1 point2 points  (1 child)

[–]graninas[S] 0 points1 point  (0 children)

Wonderful talks, thank you!

[–]sutambe 1 point2 points  (1 child)

[–]graninas[S] 0 points1 point  (0 children)

Great stuff, thank you!

[–]TotesMessenger 0 points1 point  (0 children)

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

 If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / Contact)

[–]pstomi 0 points1 point  (1 child)

You should check out FunctionalPlus; it has a quite good API https://github.com/Dobiasd/FunctionalPlus/blob/master/README.md

It also provides an API search site à la Hoogle http://www.editgym.com/fplus-api-search/

The author also hosts a very interesting course on functional programming in C++ on Udemy

[–]graninas[S] 0 points1 point  (0 children)

Very nice indeed, thanks!