On 3/7/07, Michael G Schwern <[EMAIL PROTECTED]> wrote:
Andy Armstrong wrote:
> On 7 Mar 2007, at 16:26, Eric Hacker wrote:
> [snip]
>> The first digit can be a grouping by success/failure.
>
> Yes, I see where you're going with this :)
>
>> So then if I'm not too far off base with the above, then to use
>> something different than HTTP::Status type codes would be reinventing.
>>
>> 1xx Info
>> 2xx Success
>> 3xx Redirect, probably not applicable to testing
>> 4xx Failure
>> 5xx Server/System Error
>
> As I say I'm broadly in favour of something /like/ this - but we have a
> clean slate here and it seems kind of arbitrary to commit to using
> HTTP-like status codes when we don't have to.

Any time you start writing a system that involves representing states as
numbers and doing bitmasks and math to add extra meaning, step back and
remind yourself that its 2007 and this is not C and you're not writing a
network protocol.  You shouldn't have to memorize a table or do math in your
head to figure out the basics of what a message means.

And god forbid we had more than 100 failure types!

If you want to say "Temporary Redirect" don't say "307" say "Temporary
Redirect"!  If you want to put lots of information into one value, like
categorization, use a hash!  { type => "Redirect", permanent => 0 }

Numeric response codes have the advantage that they are language agnostic.

Yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

Reply via email to