On Mon, 2018-08-06 at 20:50 +0200, Michael Osipov wrote:
> Am 2018-08-06 um 19:31 schrieb Gary Gregory:
> > Hi All:
> >
> > All constants in the HttpStatus class are prefixed with HC_.
> >
> > Why bother?
> >
> > IMO this:
> >
> > if (code == HttpStatus.OK) {
> > }
> >
> > reads better than:
> >
> > if (code == HttpStatus.SC_OK) {
> > }
> >
> > I don't have to think about what "SC" means, I already know that I
> > am
> > talking about a HttpStatus.
>
> +1
>
> My general rule of thumb is if everything has the same prefix then
> theĀ
> prefix is obsolete.
>
Well put. It is hard to argue with that.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]