Re: [whatwg/url] URLSearchParams: calling .set() and .append() should return itself (#90)

> Oh, I was talking about get() returning null rather than undefined (as it does in ES).

Ah. Yeah, that can be nice when the multi-map is typed.  

> As was pointed out on public-script-coord what ES does doesn't make much sense. It's totally unclear what methods will return this and what methods will return something else.

I agree that for some APIs that might be the case, but there is only a limited set of operations for Map/Set-like things. It's pretty easy to map them to ES and match the behavior (e.g., when you add and append stuff).  

> And if we ever got to a point where append() might not succeed, we cannot indicate success through a return value anymore.

Sure, but that would be fairly exceptional... thus throw, no?   

Anyway, if it's just me that things it's a bit annoying then I'm ok to close this - but I keep hitting it. Wish we had some way of gathering better developer feedback about this kind of thing. Running an totally unscientific poll about it:
https://twitter.com/marcosc/status/811114887959048196  



-- 
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/90#issuecomment-268178845

Received on Tuesday, 20 December 2016 07:58:46 UTC