6 comments

4

What? How can you program without branches? Okay I know nothing about functional programming. I assume every time I write a function doesn't count.

4

Any extremist approach to software development is less effective than a pragmatic approach, and functional programming (while it has its uses) seems to attract zealots more than most. Hiding your branches in lambda functions just obfuscates your code.

1

Well, it's no worse than hiding your branches in layers upon layers of abstraction like pure OOP advocates.

The thing I like about Functional programming is that it encourages smaller, more easily unit testable functions.

2

Oh totally, any time you start putting your obsession with a particular paradigm above the need to write good code, you end up with unreadable crap.

I can definitely see how FP's lack of side effects makes it attractive for concurrent processing (although 'real' OOP's messaging gives similar advantages without IMO being so restrictive) but as so often happens with neat software development tricks, it often seems to devolve into mental masturbation on the part of ivory-tower coders.

1
type Bool = forall a. a -> a -> a

Look no ifs!

1

Nice. This is a basic result in the SKI combinator calculus. https://en.wikipedia.org/wiki/SKI_combinator_calculus