2 ms·
> Which is know to be a very bad design. If your abstraction leaks that the implementation is a local call, and then you try and change that later, unquestiona
by randomdata 4y ago
> Which is know to be a very bad design.
If your abstraction leaks that the implementation is a local call, and then you try and change that later, unquestionably. Again, you need to avoid leaking implementation details, which is too why you can't just add a try operator and make it automatically useful. Any leak of any kind in your abstraction will make life miserable later. Don't let your abstraction leak.
> Yeah, and it avoids all the hassle.
All it does is move where the code is located, placing the onus on the producer "the producer is always right" instead of the caller "the customer is always right". You don't actually avoid anything, just change the perspective.
> Why couldn't any language (and especially Go) just do the same?
Perhaps it could, but it requires that the language take a more macro look at the problem. It is not a microfeature.
- deleted 4y ago[deleted]