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 conventions #2

Closed
wibblymat opened this issue May 15, 2016 · 1 comment
Closed

Naming conventions #2

wibblymat opened this issue May 15, 2016 · 1 comment

Comments

@wibblymat
Copy link

I think we need to come up with naming conventions that our whole team can agree on. I personally dislike the practice of adding 'Promise' to the name of functions that return promises, especially as it becomes the norm for functions to return promises. I certainly wouldn't see us do this for other return types.

I don't really think it adds anything, and in many cases can be more confusing - I would expect globPromise to be a Promise rather than a function that returns one, for example. And I would expect processPromiseWrapper to be a method that takes a 'processPromise' (whatever that might be) and wraps it, whereas it is actually something that promisifies process.

On the flip side, I know that my natural style is at the minimal end of the spectrum, and I'm sure plenty of people feel that my names are not descriptive enough.

This is totally a discussion for after I/O though!

@jeffposnick
Copy link
Contributor

We're using the goog.* namespace for all the things we export into the global scope.

Within the actual helper code, I don't believe that there are any methods with Promise in the name, and everything is JSDoc-ed to indicate what it returns, etc.

Some of the build infrastructure still does use Promise in the method names, but I'm on board with not doing that moving forward.

gauntface pushed a commit that referenced this issue Sep 7, 2017
# This is the 1st commit message:

Moving to an _private method

Adding changes from feedback from PR

# This is the commit message #2:

Fixing lint
gauntface pushed a commit that referenced this issue Oct 5, 2017
# This is the 1st commit message:
Small set of tweaks to make it clearer what publishing is doing at each stage

# This is the commit message #2:

Fixing long lines

# This is the commit message #3:

Current brain dump

# This is the commit message #4:

Adding logs
gauntface pushed a commit that referenced this issue Oct 6, 2017
* # This is a combination of 4 commits.
# This is the 1st commit message:
Small set of tweaks to make it clearer what publishing is doing at each stage

# This is the commit message #2:

Fixing long lines

# This is the commit message #3:

Current brain dump

# This is the commit message #4:

Adding logs

* Small set of tweaks to make it clearer what publishing is doing at each stage

Fixing long lines

Current brain dump

Adding logs

Fixing up github and cdn publishing

Adding review feedback
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