thiru-mg commented on code in PR #3308:
URL: https://github.com/apache/avro/pull/3308#discussion_r1947988262


##########
lang/c++/impl/json/JsonDom.cc:
##########
@@ -177,5 +177,22 @@ std::string Entity::toString() const {
     return result;
 }
 
+std::string Entity::to_string() const {

Review Comment:
   1. The name of the function is at variance with the style followed 
throughout: we use camelCase everywhere and this function uses snake_case.
   2. It seems to do exactly the same as what `toString`, only a bit more 
efficiently. But then the logic is duplicated from other parts of the class. 
The user will get confused why there are two functions with the same 
functionality.
   
   I suggest we go with one of the following:
   
   1. Just remove `to_string` function and call `toString`. Or,
   2. Rename the current `toString` to something like `toString_`, make it 
private and rename this function to `toString`.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@avro.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to