ctubbsii commented on PR #5350:
URL: https://github.com/apache/accumulo/pull/5350#issuecomment-2719430920

   > 2\. Creating Constants.ZRELATIVE_ROOT to replace leading "/" in various 
places in the code.
   
   I'm not sure this one should be done. I think hiding the "/" behind a 
constant in the few places where it is needed makes those places less easy to 
read. I'd also avoid using words like "relative" or "absolute" when talking 
about paths, because those mean different things than what's happening here. 
Typically, an absolute path is one that starts with a slash and contains no 
relative path elements (e.g. `/` or `/path/to/someplace`), and relative paths 
contain dots or start with path names (e.g. `./`, `..`, `path/to/something`, or 
`/path/to/../something`). ZooKeeper does not use relative paths at all. 
However, the absolute paths it does use can be "relative" to a "chroot" 
absolute base path element. Referring to absolute paths as "relative" to 
another path can be confusing, even if one takes great care to be precise in 
the wording. I think it's better to just avoid it. The places where `/` are 
used as a leading path prefix, or complete path, are not common, but where they 
do occur, 
 they are typically more readable and obvious when seen as a string literal 
than when used as a constant.


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