worryg0d commented on PR #1822:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1822#issuecomment-2419387076

   > I'm reviewing the protocol/envelope changes for the new protocol v5 frame 
format and one thing I'm noticing is that the name `frame` can either reference 
the "old frame" (called envelope in v5) or the "new frame" and you can't really 
tell easily which one it is when reading a particular function that references 
that name (one has to read the "surrounding" code to understand where it is 
being called and if it refers to the protocol v5 format or not).
   > 
   > In the java driver this was avoided by calling the new v5 frame a 
"segment" while "frame" essentially always refers to the envelope (so "frame" 
remains the same as a concept). It's not ideal to use a word that is not even 
referenced in the protocol spec but I think having this clear distinction 
between the two would be very helpful to make the code easier to read (also 
prevents bugs by someone conflating the two while modifying the code).
   
   I agree because I had the same problems distinguishing frames and envelopes. 
I wanted to call it another way, but according to proto spec, it should be 
called as **frames** so I decided to leave this part until it got reviewed. 
Then we could call it **Segment** instead of frame. Also, it makes it easy for 
other contributors (e.a. from java-driver) to distinguish them.


-- 
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