On Tue, Nov 19, 2019 at 01:07:05PM +0800, Anand Jain wrote: > On 11/15/19 11:58 PM, David Sterba wrote: > > On Mon, Nov 04, 2019 at 02:33:02PM +0800, Anand Jain wrote: > >> + case 'v': > >> + bconf.verbose < 0 ? bconf.verbose = 1 : bconf.verbose++; > > > > This code gets repeated and it's not IMO simple enough to be copy-pasted > > around. Eg. bconf_be_verbose() and eventually bconf_be_quiet(). > > I was just concerned- it will make life of other developers difficult, > IMO too much abstraction in the code is almost like learning a new > programming language for the new person looking at the code. > For example fstests. To write patch for fstests you need to > learn about a lot of helpers, defines and functions and filters > specific to fstests but you wouldn't have had this problem if the > fstests abstractions were limited and if it embraced open-code style. > Just my 1c. Yes it takes time to learn the abstractions but then it makes a lot of things easier and allows to think about what to do and not necessarily how. In a clean codebase there are enough examples to follow or copy & adapt, I don't think it's a big deal and that it's normal and expected when one works on various code bases.
