Classification of functions in http://dlang.org/phobos/std_path.html:

1. Functions that allocate GC memory and return an array:

dirName, setExtension, defaultExtension, buildPath, buildNormalizedPath, absolutePath, relativePath, expandTilde

These are prime candidates to be converted into algorithms.


2. Functions that return a slice of their input arrays:

  baseName, rootName, driveName, stripDrive, extension,

Should be enhanced to accept RandomAccessRange and produce RandomAccessRange


3. Functions that return a range:

  pathSplitter

Enhance to accept RandomAccessRange


4. Functions that take an array and compute a value:

  isRooted, isAbsolute, filenameCmp, globMatch, isValidPath

These are reducers, and should be enhanced to accept input ranges.


Reply via email to