ucloud: Callback name improvement. #56
Closed
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.
The current callback names,
on_readandon_write, are confusing for a few reasons:Ambiguity: These names do not clearly indicate the direction of the data flow or the action being performed. It's not apparent whether the reading or writing is happening on the client-side or the server-side. This ambiguity can lead to misunderstandings about the purpose and functionality of the callbacks.
Lack of context: The names on_read and on_write are generic and could apply to a wide range of scenarios, making it difficult to grasp their specific roles within this particular code. Without a clear context, developers may struggle to understand how these callbacks fit into the overall system.
Terminology inconsistency: The terms "read" and "write" are often associated with file I/O operations, which could lead to confusion when used within a context where data is being sent to and received from the cloud. By using more descriptive names, like on_send_to_cloud and on_update_from_cloud, it becomes easier to differentiate between local file operations and cloud data interactions.