maskit commented on pull request #8170:
URL: https://github.com/apache/trafficserver/pull/8170#issuecomment-893261773


   > So I started to pull the url_*_set functions into the URL methods, but 
those free functions are also used else where.
   
   That is not what I'm suggesting. url_*_set functions are ok as they are.
   
   > The url_get functions are not called from anywhere. So I think this PR as 
it stands is useful. Removing unused functions. 
   
   I'm suggesting to use those url_*_get functions in URL class' methods.
   ```
   inline const char * 
   URL::user_get(int *length) 
   { 
     ink_assert(valid()); 
     return url_user_get(m_url_impl, length);
   } 
   ```
   
   No dup code, no unused code, no detail exposure, and no inconsistency. And 
once we do this, making all the free functions to URLImpl's methods is probably 
just a couple of regex operations since the first parameter is a pointer for 
URLImpl instance.
   
   I think this is the right direction, because I'd have to add back the unused 
functions to achieve no detail exposure and no inconsistency if you remove the 
functions. It's not a big deal, but I'm not going to approve removing the 
functions for the reasons above. If you disagree find someone else to get an 
approval.
   
   
   


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


Reply via email to