Proposal for std.path replacement
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Mar 6 07:29:27 PST 2011
On 3/6/11 6:31 AM, Lars T. Kyllingstad wrote:
> In summary, it seems currentDirSymbol, baseName, dirName and driveName
> are clear winners. Less clear, but still voted for by the majority, are
> extension and stripExtension. It is a tie between dirSep and
> dirSeparator.
>
> Below are the votes I counted. And before you say "hey, I didn't know we
> could make suggestions of our own", or "why did that guy get several
> votes?", this was by no means a formal vote. It was just trying to get a
> feel for people's preferences. Before the module gets accepted into
> Phobos there will have to be a formal review process, so there is still a
> lot of opportunity to fight over naming. :)
I think whatever you choose will not please everybody, so just choose
something and stick with it. Regarding all the extension naming stuff, I
suggest you go with the "suffix" nomenclature which is more general and
applicable to all OSs.
Regarding semantics, consistently strip the trailing slash. It is
unequivocally the best semantics (and incidentally or not it's what
Unix's dirname and basename do). If rsync et al need it, they can always
look for it in the initial parameter. The reality of the matter is that
you will never be able to accommodate all use cases there are with
maximum convenience.
You may want to prepare this for review after April 1st, when the review
for std.parallelism ends. There is good signal in the exchange so far,
but from here on this discussion could go on forever and shift focus
away from std.parallelism.
Andrei
More information about the Digitalmars-d
mailing list