openPMD-standard icon indicating copy to clipboard operation
openPMD-standard copied to clipboard

Paths: End on /

Open ax3l opened this issue 6 years ago • 2 comments

First seen in https://github.com/openPMD/openPMD-validator/issues/43

Should we define that all paths end on / in the standard?

I think imposing the final / makes implementations easier (good!) while cluttering the standard with details a little. A path join operation is in principle the logical way to implement it (available in Python and modern C++) which then would be agnostic. Nevertheless some very rudimentary languages might not have such high-level functionality.

The example currently shows a trailing / and I think it might make things indeed easier for implementations which I favor for the community.

ax3l avatar May 15 '18 07:05 ax3l

OK with me.

DavidSagan avatar May 21 '18 19:05 DavidSagan

Implementation convenience aside, this adds desirable semantic clarity. Enforcing path-terminators makes paths obvious in all places. Paying one character in return for this expressiveness should be worth it.

Nevertheless some very rudimentary languages might not have such high-level functionality.

We should try to keep this standard agnostic to the standard library support of any language. Should a (sane) code written in those languages implement funtionality involving paths, verification and normalization should be performed, anyway. Whether there is an additional slash or not will not have a significant impact.

C0nsultant avatar May 21 '18 19:05 C0nsultant