Skip to content

Comment on Google's advise to use abstraction to improve functionparent

Comments

It's all about the right level of abstraction at the right time. The example given is too kind to the reader, I can imagine functions with 1000s of lines with the exact same structure of doing too much distinct sub-steps. Of course you don't want to create something like the indirection hell that frameworks like Spring in Java create but it's not hard to find a middle ground. For instance I find it specially easier to create code like the right-hand side when I'm using test driven development.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.