Implicit code is indeed beautiful. DHH has also struck a great balance of implicit code remaining remarkably expressive with Ruby on Rails. It is the best example i have seen. But i would cite 2 shortcomings of implicit code:
- Implicit code increases the barrier of entry to new coders. This is counterintuitive as there is less overall code to learn. But implicit code often relies on auto-magic. Until you know the pieces of that magic, you are left confused. Case in point, as a web coder to find the file for `render user`.
- Implicit code works great until you need something to work differently than the implicit nature intends. This is because implicit code is also opinionated code. When your feature needs to fight against those opinions, you can expect to write a lot of highly explicit, ugly code to break that mold.
The slider of explicit-implicit will be talked about as long as code exists. Implicit systems result in less LoC, but you risk sacrificing expressiveness. For growing applications supported by growing teams, some of that time gain can slowly fade as your team gets younger and less experienced.
There is a large extra shortcoming: debugging. When reasoning about implicit code, there are more assumptions you need to make. Debugging is basically verifying assumptions until you find the disconnect between your reasoning and code execution.
The implicit code requires you check all of the implicit assumptions. Explicit code makes checking such assumptions much easier.
Excellent point! So far I get the impression that 'level of abstraction' and it's benefits/downsides can be separated into a bunch different categories (readability, conciseness/concision, ease of getting back into things after being away, protection from various classes of errors, etc.). Ease of debugging will now be another one on my list.
- Implicit code increases the barrier of entry to new coders. This is counterintuitive as there is less overall code to learn. But implicit code often relies on auto-magic. Until you know the pieces of that magic, you are left confused. Case in point, as a web coder to find the file for `render user`.
- Implicit code works great until you need something to work differently than the implicit nature intends. This is because implicit code is also opinionated code. When your feature needs to fight against those opinions, you can expect to write a lot of highly explicit, ugly code to break that mold.
The slider of explicit-implicit will be talked about as long as code exists. Implicit systems result in less LoC, but you risk sacrificing expressiveness. For growing applications supported by growing teams, some of that time gain can slowly fade as your team gets younger and less experienced.