Sober7135 commented on issue #846:
URL: 
https://github.com/apache/incubator-graphar/issues/846#issuecomment-3876982069

   I have some new findings: 
   The meaning of `empty_` is ambiguous. `AddProperty()` sets empty to `false` 
even if the `id_` is still uninitialized, so `empty_` does not reliably 
indicate whether `GetId()` is safe to call.
   
   
https://github.com/apache/incubator-graphar/blob/7bad8ec50f79314b7b9db472ae6e699d27d450f6/cpp/src/graphar/high-level/vertices_builder.h#L91-L118
   ---
   TBH, I prefer removing the `empty_` since this is the cleanest way, and I 
think constructing a `Vertex` with an id is the most straightfoward way.
   
   For the API change, maybe we can first deprecate the default constructor and 
`Empty()` and initialize `id_` to -1 ? 
   
   For deprecation in C++, see 
https://stackoverflow.com/questions/295120/how-can-i-mark-a-c-class-method-as-deprecated
   
   CC @yangxk1 @SYaoJun 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to