4 ms·
There is some faulty assumption that functional programming is never imperative. Functional programming has nothing to do with declarative/imperative programmi
by austincheney 10y ago
There is some faulty assumption that functional programming is never imperative. Functional programming has nothing to do with declarative/imperative programming styles. The "functional" part determines the architecture by which the code is structured opposed to the style (vanity) by which the structure comes together.
If you need to compare functional programming against something contrast it against OOP, which is a different architectural approach.
- jackmott 10y ago>Functional programming has nothing to do with declarative/imperative programming styles. nothing!? >The "functional" part determines the architecture by which the code is structured opposed to the style (vanity) by which the structure comes together. No idea what this means.
- hhandoko 10y ago> Functional programming has nothing to do with declarative/imperative programming styles. > The "functional" part determines the architecture by which the code is structured opposed to the style (vanity) by which the structure comes together. I think it means a code can be functional but looks imperative. One example is the for-comprehension in Scala: val aFuture = future(a) val bFuture = future(b) (for { a <- aFuture b <- bFuture c <- futureC(a, b) } yield c) This is just a contrived example for working with `Future[T]`, but it can be applied to other monadic types. For an example library that can be used with a few different styles, have a look at this: http://jsuereth.com/scala-arm/usage.html http://jsuereth.com/scala-arm/usage.html