

Three branches and a fifteen-line ceiling sounds generous until you write against it.
I disagree with this. There is a lot of situations where breaking these rules results in more readable code and trying to follow them strictly results in code that is far harder to read overall. Sometimes colocated code is the more readable solution. There is no hard and fast rule that can make code more readable. Only general guidelines that don’t always work.
This has Uncle Bob vibes which just takes this to the extreme - thinking you can only have 1 branch and 5 lines in a function. It does not solve the complexity problem. It just spreads it around and thus makes the whole program and logic flow harder to read as you need to make far more jumps through the code to understand it.






Define ‘actually out of ram’. If it is writing to swap then it is out of ram. That ram might not all be used by application memory, it could be used by the filesystem cache. Both are important for performance of applications. If you only favour application memory then it it will constantly dump files it has recently read and might be still required by applications rather then dropping some unused application memory instead.