3 ms·
> I mean, if you send a (synchronous) command, shouldn't you at least get a success/error indication as a return value? Yes. > I've met someone who argued aga
by dataflow 3y ago
> I mean, if you send a (synchronous) command, shouldn't you at least get a success/error indication as a return value?
Yes.
> I've met someone who argued against even that, insisting that all commands must be void nothrow
Sounds like that person took this to the extreme, rather than the principle itself not making sense.
- Joker_vD 3y agoSo a command could either return all different kinds of errors, with informative payloads even, or a generic 'ok', instead of arguably more reasonable (since we already return variants with payloads) design of an 'ok' with some useful payload? Or will it literally be a Boolean "success/failure" value? Admittedly, both are possible designs but I just... don't agree with neither of them. Allowing error states to be returned directly by the command while requiring success states to be queried separately already breaks the CQS; and returning a bool is no more useful than returning void: you'll have to do the same follow-up query in both cases.
- hinkley 3y agoIf everything smells like shit, check your shoe.