Re: [whatwg/url] Consider adding non-throwing URL.parse(input, base) (#372)

I still think this, more so than many of the API additions proposed, is a good idea with no real downsides. IMO parser APIs should always provide a mode that returns a failure sentinel instead of throwing an exception. See e.g. https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/exceptions-and-performance#try-parse-pattern

However, I admit that we haven't seen a lot of demand---probably because try/catch is easy enough to use.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/372#issuecomment-623487646

Received on Monday, 4 May 2020 14:11:35 UTC