beark / ftl

C++ template library for fans of functional programming
zlib License
992 stars 69 forks source link

Should I first learn haskell adequately before using this library? #5

Open therealgymmy opened 10 years ago

therealgymmy commented 10 years ago

Hi, I'm putting this question here because I couldn't find a way to message you on GitHub.

First, I just want to say this library feels amazing!

Then, I'm wondering if I should get a good understanding of haskell first before jumping in this library? I tried to write a calculator parser using FTL. The code looked amazing but it took me forever to figure out how to do certain things using FTL. I realized that I don't actually understand the concepts such as applicative functor or monad. I've only heard of these terms from reading articles talking about haskell.

I would love to use this amazing library as much as possible, but it seems my lack of understanding of haskell is hindering my progress. Would learning haskell first be necessary to use this library effectively? Or, perhaps there're some good websites out there which introduce the fundamental concepts of functional languages?

Thanks,

beark commented 10 years ago

First of all, thanks for the praise! It's very nice to hear you like FTL.

I would recommend any one who hasn't already to pick up a functional language. Even if you don't end up particularly impressed with the style, you will amost surely learn something that will be useful in your every day programming anyway.

As for learning FTL and its concepts: it shouldn't be necessary to first learn e.g. Haskell or Scala, but it's quite probably currently easier that way. Which raises a good point: it shouldn't be that way. It's always been my intent that, at least eventually, people could pick up the concepts directly through the library docs, tutorials, etc.

I will leave this issue open for now and consider it to be a request for more learning material on the library. Either I'll do a blog series on these things on libftl.org, or I'll put up a wiki here... We'll see.

pa-zz-yco commented 10 years ago

I don't personally have a lot of experience with FTL (so excuse me @beark for injecting myself into the conversation), but I agree that it will be easier to learn its concepts through the lens of a language focused on those concepts. Personally, I'd say to start with Haskell. It's more immediately intimidating than Scala, but I think that becomes an advantage here--all Haskell tutorials take that intimidation into account. Haskell makes it a lot harder to fall back on techniques you're familiar with, which forces you to think in terms of the new concepts. In my opinion, Scala's nature as a functional layer above a forgiving Java safety net makes it a little too easy to fall back into OO style to be a great starting place.

As for a specific tutorial, I recommend Learn you a Haskell for Great Good. You can read it for free on learnyouahaskell.com

therealgymmy commented 10 years ago

Awesome! I guess being able to use FTL effectively is now the biggest motivation for me to learn Haskell :-)