4 ms·
I agree with you in general, and I've never written code in this style. But at the same time, converting between error and result domains is tedious and error-
by kelnos 3y ago
I agree with you in general, and I've never written code in this style.
But at the same time, converting between error and result domains is tedious and error-prone. As much as we believe separating concerns is a good thing, it's pretty likely that service layer code will never ever be used outside a HTTP service context, so... so what?
I probably still wouldn't design like this in my own stuff, but I'm not convinced it's actually so terrible.
- calebio 3y agoI guess it really depends on what kind of stuff we work on. It's very common for service layers in systems that I work on to be shared between various ingress points (HTTP, GRPC, Kafka handler, etc).