Question:
Does the term "readability" refer also to the transparency of code functionality?
For Example:
I read that a downside of Dependency Injection is a sacrifice to readability. The idea being that to follow all of the strict syntax of a DI library, one has to write much more code than would be required to write the functionality without DI involved. So I quickly imagined up an example DI syntax which would be simpler (and in my mind more readable) than a strict implementation of DI. Something like this.
Note, this code isn't particularly amazing or perfect syntax in any sense, it's just to get the abstraction in my question across:
fooBar
.focusGroup('Menu')
.addComponent('menuConfig')
.addType('service')
.addInterface('data', 'value');
fooBar
.focusGroup('Menu')
.addComponent('subMenuHandler')
.addType('service')
.addInterface('handle', 'function');
fooBar
.focusGroup('Menu')
.addComponent('menuHandler')
.addType('client')
.injectDependency('menuConfig', 'subMenuHandler');
But then it occurred to me that while the functionality of those methods and syntax appears obvious, it might actually be considered less readable because the things that are actually happening have been abstracted behind a simple syntax representing a complex library.