3 ms·
Code like f(g(x), h(y)); is not too unusual, and g and h could be arbitrarily complex.
by lmm 7y ago
Code like
f(g(x), h(y));
is not too unusual, and g and h could be arbitrarily complex.
- jcelerier 7y agoI must say that it looks super unusual, at least for the codebases I know, for non-trivial g, h. e.g. I just ran rg "[a-zA-Z0-9_]+\(.*\(.*\).*\(.*\).*\)" | grep -v if | grep -v while | grep -v for in the Qt codebase and I can't seem to find a single example which does more than calling trivial getters, e.g. sort(v.begin(), v.end()) or foobar(point.x(), point.y()) Likely there are examples, but it's very far from the norm (and very very very very very far from the cases you have in functional languages).