Re: [whatwg/url] Convenience method to return an Object (#143)

Trying to fight the grain of the community on objects is sad.

Object literals are extremely convenient and will not stop being so because `Map` exists. Therefore 99.9% of JS APIs will accept `Object` *forever*. From that we know that passing the data from `URLSearchParams` into these object-accepting APIs is going to be extremely common.

In addition, your answer above may be a model of concision, but it didn't deign to address any of the points I made:

1. Every JS developer knows how to use objects-as-maps
2. All library APIs expect it - Express, Angular, Ember, Lodash, Underscore etc - and will continue to accept them because of the literal syntax
3. It is not error prone. Citation needed? How many times do people hit a bug with `$.ajax({ ... })`? How many bugs in node core, Angular, etc are around objects-as-maps? Why do smart people write and continue to use libraries like lodash and underscore productively?

Why not simplify the use-case most people will be hitting - `URLSearchParams -> jQuery|Angular|React|Ember` - rather than mandating years of hand-written conversion?



-- 
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/143#issuecomment-240367883

Received on Wednesday, 17 August 2016 09:59:39 UTC