The rise of functional programming has affected many programming languages, and C++ could not escape from it. The need of paradigms like partial application (via currying) and functional composition are now a reality also in C++, and the spread of libraries like FIT and FTL is an evidence.
Cat is a C++14 library, inspired by Haskell. Cat aims at pushing the functional programming approach in C++ to another level.
The added value of Cat is twofold. On one hand it works for filling the gap in the language with respect to functional programming. For this purpose, some utility functions and classes are provided (callable wrappers with partial application, sections, utilities for tuples, extended type traits, alternative forwarding functions, etc).
On the other hand Cat promotes the use of generic programming with type classes, inspired by Category Theory. A framework for building type-classes along with a dozen of them (Functor, Applicative, Monoids, Monads, Read, Show, to mention just a few) and the related instances dropped in the context of C++ are included in the library.
Non vorrei sembrare antipatico, però consentitemi un piccolo risentimento: Il sito si chiama italiancpp, l’autore di questo articolo Nicola Bonelli che molto probabilmente è italiano, però l’articolo è scritto in americano. 🙂 🙂 🙂
Lo so, lo so, è un mio problema.
Grazie.
Molti articoli sono in inglese per consentire agli autori di essere letti e ricevere feedback da tutto il mondo 😉