Re: [whatwg/url] Support relative URLs (#531)

That is all fair enough.

Though I will note that a lot of what is described in Alwin’s spec doesn’t need to be exposed by an API. It can serve only as a mechanism for the spec itself to talk about URLs and describe them.

Personally, I feel like the way URLs were modeled and described in Alwin’s spec makes it clearer to follow it. You can read the description of the operations therein, and it’s immediately obvious what they do and how they work. You don’t need to mentally try to follow a state machine algorithm, you can just understand what each (very tersely described) operation does individually at a glance. In my opinion, the definitions are each succinct and simple, and they all come together to describe URLs succinctly.

I definitely agree that, if relative URL manipulation is incoporarated, it should *not* be overloaded into the existing `new URL(...)` APIs, and I also understand that it is awkward to introduce a completely new API for it. There would definitely be an issue with two similar APIs doing similar things that you have to choose between. I don’t have a good solution for that, and it might be too difficult to avoid it.

> serialising that URL record and parsing it again results in an equivalent URL record.

About this specifically: This is true in Alwin’s spec and implementation too. It just turns out that the way he modeled it, it also allows for relative URLs to be represented too.

- - -

I also want to note that I was *also* criticizing Alwin’s behavior. I don’t think the way he was acting was appropriate, it does really seem like he just gave up on arguing as soon as people criticised his work. I think this should be an effort to come up with something that works well for everyone, instead of assuming people are working against each other.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/531#issuecomment-1034267162

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/531/1034267162@github.com>

Received on Wednesday, 9 February 2022 22:33:44 UTC