Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: adopt Infra number definitions (and redo IPv6 pieces) #838

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

annevk
Copy link
Member

@annevk annevk commented Nov 18, 2024

url.bs Outdated Show resolved Hide resolved
@annevk annevk requested review from domenic and rmisev November 19, 2024 10:37
url.bs Outdated Show resolved Hide resolved
Comment on lines +763 to +766
<p>An <dfn export id=concept-ipv6>IPv6 address</dfn> is a <a for=/>128-bit unsigned integer</a> that
identifies a network address. This integer is composed of a <a for=/>list</a> of 8
<a for=/>16-bit unsigned integers</a>, also known as an <a for=/>IPv6 address</a>'s
<dfn export for="IPv6 address" id=concept-ipv6-piece>pieces</dfn>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definition is obscure: it is not clear how to convert a 128-bit integer to a list of pieces and vice versa. Also, all algorithms use an IPv6 address as a list of pieces, not as a 128-bit integer. By the way, RFC4291 defines an IPv6 address slightly differently: "IPv6 addresses are 128-bit identifiers...". So I think it is better to use the RFC4291 definition - replace "unsigned integer" with "identifier":

An IPv6 address is a 128-bit identifier that identifies a network address. This identifier is composed of ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All algorithms inside URL, yes, but outside? This we would have to change separately though as changing it from integer to identifier would not be an editorial change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree that this is a bit confusing. I can see how it's "conceptually" a u128, or "corresponds to" a u128, but in practice every part of the spec treats it as a list of 8 u16s.

@annevk annevk requested review from domenic and rmisev November 25, 2024 17:58
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, matches whatwg-url with some variable names being clearer in this version.

Comment on lines +763 to +766
<p>An <dfn export id=concept-ipv6>IPv6 address</dfn> is a <a for=/>128-bit unsigned integer</a> that
identifies a network address. This integer is composed of a <a for=/>list</a> of 8
<a for=/>16-bit unsigned integers</a>, also known as an <a for=/>IPv6 address</a>'s
<dfn export for="IPv6 address" id=concept-ipv6-piece>pieces</dfn>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree that this is a bit confusing. I can see how it's "conceptually" a u128, or "corresponds to" a u128, but in practice every part of the spec treats it as a list of 8 u16s.

@annevk annevk merged commit 7ff8de0 into main Nov 26, 2024
2 checks passed
@annevk annevk deleted the annevk/numbers branch November 26, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants