4 ms·
> Because they allow you to compose higher level entities? That isn't true. FP still uses data records, they're just not tightly coupled to the functionality
by louthy 10y ago
> Because they allow you to compose higher level entities?
That isn't true. FP still uses data records, they're just not tightly coupled to the functionality like OO. Pure functions + immutable types is a more powerful programming paradigm than data and functionality encapsulation via classes and methods.
Also more advanced techniques like combinators can encode more complex and extensible patterns in a significantly more robust way than any OO class hierarchy (see 'parser combinators' for an example).