redex / data

23 stars 66 forks source link

add bs-abort-controller-2 #135

Open lxsmnsyc opened 4 years ago

lxsmnsyc commented 4 years ago
"bs-abort-controller-2": {
  "category": "binding",
  "platforms": ["browser", "node"],
  "keywords": ["binding", "abort-controller", "abort"]
}
glennsl commented 4 years ago

Hey. This looks good, except for the name. You should really just namespace it instead. The bsconfig.json example in the readme is also wrong. It should be renamed there as well.

lxsmnsyc commented 4 years ago

Thanks for the reply!

May I ask what's the decision behind publishing it in a namespace? As you can see, I have already published the package: https://www.npmjs.com/package/bs-abort-controller-2

glennsl commented 4 years ago

A namespace is a lot more descriptive, authoritative and avoids awkward collisions. Since you own the namespace, consumers know that packages published in that namespace are yours. There's no confusion, and it's easy to distinguish your package from someone else's package. You don't have to go around remembering that 2 is yours while 3 is the other guy's.

Also, for bindings specifically, what if there's an abort-controller-2 package published? What should the bucklescript bindings for those be called when you've taken the most obvious name for it. bs-abort-controller-3? Or bs-abort-controller-2-2? With namespaces these problems don't exist.`

lxsmnsyc commented 4 years ago

Just to clarify, we are talking about NPM namespace (aka scoped packages) and not BS namespaces right?

glennsl commented 4 years ago

Correct :)