Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bs-abort-controller-2 #135

Open
lxsmnsyc opened this issue Jan 11, 2020 · 5 comments
Open

add bs-abort-controller-2 #135

lxsmnsyc opened this issue Jan 11, 2020 · 5 comments

Comments

@lxsmnsyc
Copy link

"bs-abort-controller-2": {
  "category": "binding",
  "platforms": ["browser", "node"],
  "keywords": ["binding", "abort-controller", "abort"]
}
@glennsl
Copy link
Member

glennsl commented Jan 14, 2020

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
Copy link
Author

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
Copy link
Member

glennsl commented Jan 14, 2020

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
Copy link
Author

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

@glennsl
Copy link
Member

glennsl commented Jan 14, 2020

Correct :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants