- From: Anne van Kesteren <notifications@github.com>
- Date: Tue, 14 Jun 2022 07:35:02 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 14 June 2022 14:35:14 UTC
Do the use cases want _potentialIPv6String_ -> boolean or _potentialHostString_ -> _hostTypeEnum_? I could also see _potentialHostString_ -> null or _serializedHostString_, though the downside of string-in-string-out is that you cannot hand out type information at the same time, so we probably still want `URLHost`, even if we add some static conveniences. Anyway, I think this idea is reasonable, but whatever shape we give to the API, the lowest we should go is the "host parser" in terms of what we end up giving inputs to and taking outputs from. That is, let's not invoke the IPv4 parser directly even if the API shape is `parseIPv4()`. This adds some overhead, but ensures consistent processing for various edge cases. Implementations can optimize code paths depending on the shape of the API. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/696#issuecomment-1155278990 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/url/issues/696/1155278990@github.com>
Received on Tuesday, 14 June 2022 14:35:14 UTC