This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that this is concise --- but how about we make it clear that we're talking about a specific parameter, and maybe just reword the paragraph entirely, because it wasn't particularly well written to begin with. It sounds sort of Yoda-ish, you know? (Referring especially to the preceding "When passed two or more arguments, a new module created is." bit), and just doesn't come across as particularly natural.
Something more like "Creates a new {@link angular.Module} when passed more than one argument, or retrieves an existing {@link angular.Module} when only passed a single argument.", maybe? It's not perfect, but sounds slightly less weird to me.
If we're going to mention "name" at all, lets wrap it in codeblocks (surround with backticks) to hint that it refers to a parameter. And, if we aren't going to mention the position in the list, maybe at least refer to it as "the
nameargument" or something.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes i like that! How about:
"Passing one argument retrieves an existing {@link angular.Module}, whereas passing more than one argument creates a new {@link angular.Module}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that sounds good to me! --- Minor nit, comma before "while" --- and you might consider replacing "while" with "whereas", but I'll leave that up to you