Tag Info

Hot answers tagged

11

If by functional programming you mean programming only with immutable values, sure, you can do that. But it's going to be painful. In a lot of cases you don't get to take advantage of: First-class functions with lexical scoping (a.k.a. closures) Functions with identifiers that are mostly special characters Infix functions Type inference Tail call ...


8

So this is actually a referenced to a paper by Meijer and a few others called "Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire", the basic idea is that we can take any recursive data type, like say data List = Cons Int List | Nil and we can factor out the recursion into a type variable data ListF a = Cons Int a | Nil the reason ...


1

It is certainly possible to program in a purely functional style in an imperative language. In fact, if you look at books like Effective Java or Java Concurrency in Practice, much of the advice in those books basically boils down to "don't use mutable state", "don't use side-effects", etc. However, it may not always be a pleasant experience, and you may not ...


1

... intuitive for developers to use, so the code itself explains and forces developers to use it in certain way... It's a myth that OO bits can be intuitive unless they are trivial. like the most fundamental framework elements. LOB objects are the opposite of that. They need good documentation and examples demonstrating all the functionality you'd hope ...



Only top voted, non community-wiki answers of a minimum length are eligible