Jul 21, 2021
1. I agree with your points. When you use that in practice you see drawbacks. Yes metrics, logging, cache etc. are all important but why should repository care about that at all? Something else should do those things. You can easily decorate the call to the repository with the logging statement.
2. You would not end up with Either<Error, SealedClass>. when you use Either you avoid that SealedClass. Either is replacing that SealedClass.
5. I didn't attack him :D. It's not production code but it would be easier to read anyways. And in case this is being done in production code I want to ward about it.