4 ms·
I answered that in the following paragraphs: It gives you a huge amount of potential for reuse -- essentially for free. (Alright, this is C++ so there's a litt
by Quekid5 8y ago
I answered that in the following paragraphs: It gives you a huge amount of potential for reuse -- essentially for free.
(Alright, this is C++ so there's a little bit of cost due to a tiny amount of extra 'syntax' where C++ imperative syntax is "free", but that's trivial for any but the most trivial of examples.)
- notacoward 8y ago"Following paragraphs" is an ambitious term for barely one line of text. You have claimed there is some unspecified promised land of reuse through unspecified transformations and combinations, but you really haven't shown anything that's not equally achievable with "mere" sequential application. It still looks like a matter of aesthetics - that you prefer a more syntax-laden functional style, but not one that's objectively better.
- avmich 8y agoLet's define "objectively better" as "allowing to do A, then B as well as to do B, then A - rather than only allowing to do A, then B". Then composability - defined as "allowing to do A, then B as well as to do B, then A" - is objectively better than imperative style - defined as "only allowing to do A, then B". In these terms it looks like a tautology. But the essense is still there - if for some reason you'd like to have a freedom of order of some transformations, you need composability, as an opposite to an approach which prescribes the order.