soc,
@soc@chaos.social avatar

@publicvoit @meisterluk Neither of those choices is correct.

The right solution is using the type-system to prevent obviously wrong code from compiling:
✅ join(AbsolutePath, RelativePath)
✅ join(RelativePath, RelativePath)
❌ join(RelativePath, AbsolutePath)
❌ join(AbsolutePath, AbsolutePath)

Another benefit is that AbsolutePath is not restricted to the root of the filesystem, but could express things like "the user's cache directory", increasing portability of paths saved to config files.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming
  • rosin
  • thenastyranch
  • mdbf
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Youngstown
  • cisconetworking
  • slotface
  • vwfavf
  • everett
  • Durango
  • kavyap
  • GTA5RPClips
  • megavids
  • khanakhh
  • osvaldo12
  • ngwrru68w68
  • normalnudes
  • anitta
  • ethstaker
  • cubers
  • modclub
  • tacticalgear
  • provamag3
  • Leos
  • tester
  • JUstTest
  • All magazines