3 ms·
I think there are about two classes roughly. The mathematically pure functions crowd with emphasis on correctness and the expressive power camp (which also help
by Dn_Ab 16y ago
I think there are about two classes roughly. The mathematically pure functions crowd with emphasis on correctness and the expressive power camp (which also helps with correctness indirectly).
I fall in the latter camp where functional programming is an approach, a style if you would. Where there are first order functions and the ability to easily manipulate them (C# fails here via verbosity), partial function application (often mislabelled currying), closures, recursion is forefront and immutability is the default. Terseness, algebraic types, tuples and pattern matching are optional but highly recommended (in my opinion Scala and Erlang are not terse relatively, Haskell/F#/Clojure are). I also find inference with static typing to be useful. [edit: by terse I don't mean by lines of code but vaguely, how busy each line is].
This combination leads to an extremely powerful and different way of thinking about and writing code that gives extensibility, composability and isolation for free. A style built around passing and assigning functions - treating functions the way most people treat variables. It also allows you to easily render abstractions of your problems without fussing with boiler plates. In terms of organizing and encapsulation it falls short but these new hybrids are shoring things up.