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

Naming standards #61

Closed
benjamingr opened this issue Jan 9, 2014 · 5 comments
Closed

Naming standards #61

benjamingr opened this issue Jan 9, 2014 · 5 comments
Labels

Comments

@benjamingr
Copy link
Collaborator

Hey, I just wanted to ask why the code does things like: Promise$_all Promise$_All and Promise$all?

Is the naming (lower case/upper case) here an important convention?

Can we rename these to something more meaningful?

@petkaantonov
Copy link
Owner

ClassName '$' methodName
ClassName '$' StaticMethodName

Underscore at the start of the method marks an internal method which also has effect in the stack trace shim that is reliant on function names on firefox.

@benjamingr
Copy link
Collaborator Author

Thanks.
Can you make a short coding standards document and add it as a .md ?

Also, what's with Promise$_all vs Promise$all? Is that a typo?

@petkaantonov
Copy link
Owner

Those are different functions with Promise$all being API function and Promise_$all being an internal function.

@petkaantonov
Copy link
Owner

The name on this function doesn't make sense though that should be changed: https://github.com/petkaantonov/bluebird/blob/master/src/promise.js#L1132-L1163

@benjamingr
Copy link
Collaborator Author

Thanks. Feel free to close this with the commit :)

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

No branches or pull requests

2 participants