News for hackers. Stuff that matters.
Re:Why Isn't Functional Programming the Norm? [video] by pyrale on Thursday October 17, 2019 @08:30AM (#21281290)
The control structure that takes the different functions/values and glue them together is what makes your code imperative or descriptive. While there is a lot of overlap between descriptive style and fp, it is not always the case.

In haskell, for instance, the do notation lets you write imperative code:

    f  article = do 
       x <- getPrices article
       y <- book article
       finishDeal article x y
...and then the compiler desugars it to a more descriptive form.
Re:Why Isn't Functional Programming the Norm? [video] by gmfawcett on Thursday October 17, 2019 @11:00PM (#21288303)
In fairness, we could be in the List monad here, and this would effectively be a list comprehension rather than an imperative program. Even if we are in IO, `getPrices` and `book` may never execute --- even `finishDeal` may never execute! --- depending on non-local details that aren't shown here.

The code certainly "looks imperative" but it's still a declarative program --- the semantics are rather different from what a typical "imperative programmer" would expect.