spec verbosity and algorithms

Hi,

this issue has been raised before, and I realize that this is the way 
Ian likes to specify things. Anyway, I just came across:

"Two origins are said to be the same origin if the following algorithm 
returns true:

    1.

       Let A be the first origin being compared, and B be the second 
origin being compared.

    2.

       If A and B are both opaque identifiers, and their value is equal, 
then return true.

    3.

       Otherwise, if either A or B or both are opaque identifiers, 
return false.

    4.

       If A and B have scheme components that are not identical, return 
false.

    5.

       If A and B have host components that are not identical, return false.

    6.

       If A and B have port components that are not identical, return false.

    7.

       If either A or B have additional data, but that data is not 
identical for both, return false.

    8.

       Return true. "

This seems to be equivalent with

"Two origins A and B are said to be the same if they are of identical 
type (opaque identifier or tuple), and all of their components have 
identical values.".

(at least if we define the tuple variant always to have the same number 
of components)

Best regards, Julian

Received on Friday, 22 January 2010 16:44:12 UTC