cactoos-http icon indicating copy to clipboard operation
cactoos-http copied to clipboard

EO violation in Wire?

Open fabriciofx opened this issue 6 years ago • 4 comments

Into the Wire interface we have a method Input send(Input input) throws IOException, but it isn't a EO violation? In EO vol 1, Yegor says "verb methods should return nothing (void)" and send() is a verb. So, should we rename it? My suggestion: Input response(Input request) throws IOException.

fabriciofx avatar Jan 19 '19 23:01 fabriciofx

@llorllale/z please, pay attention to this issue

0crat avatar Jan 19 '19 23:01 0crat

@fabriciofx fair enough, but neither solutions are correct according to Yegor's book.

llorllale avatar Mar 02 '19 13:03 llorllale

@llorllale why not?

fabriciofx avatar May 18 '19 13:05 fabriciofx

@llorllale WDYT:

interface Request extends Input {
}

interface Response extends Input {
}

Response response(Request req) throws Exception

fabriciofx avatar Jul 16 '19 13:07 fabriciofx