The way I like to think about FP vs OO is that OO usually couples state with identity and the code that operates on both, while FP defines a clear boundary between data, state, and the functions that operate on the data.
Designing a FP program often involves looking at the data first, then thinking about what transformations that the data needs in order to become what you want it to be. I like to think of functions as instructions about how to transform that data. This is overly simplistic, and I would definitely recommend some background reading/watching of videos. A good starting point would be to watch these: https://changelog.com/rich-hickeys-greatest-hits/ And read the book Functional Programming for the Object Oriented Programmer by Brian Marick if you've been writing OO code for a long time. Cheers, Jason On Thu, Oct 8, 2015 at 8:23 AM, Pattern-chaser <steve.merr...@gmail.com> wrote: > I started in software with structured design. In the 80s/90s, I discovered > OO, and was surprised to find that the main thing I gained was a different > way of looking at things. This informed my designs from then on, even when > I returned from C++ to C (I'm a firmware designer by specialisation). Now I > want to find out about functional programming, in the hope that another new > perspective will inform and improve my design and programming skills. The > question I'm posing here is simple: how do you do functional programming? > > For an OO design, you put together a number of co-operating but autonomous > class instances, and let them get on with it. Functional programming > doesn't seem to involve classes or any of the OO concepts I'm used to. So > how you do you design a program in a functional way? > > TIA for your advice, opinions and thoughts. :) > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.