D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 13949 - Alias baseName() as stripPath()
Summary: Alias baseName() as stripPath()
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Windows
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-07 20:22 UTC by basile-z
Modified: 2020-03-21 03:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description basile-z 2015-01-07 20:22:58 UTC
std.path.baseName should have an alias named stripPath

e.g:

alias stripPath = baseName;

Because it matches to the semantic used in
stripExtension
stripDrive
...

so the function set used to decompose a filename would be more homogeneous.
Comment 1 Jonathan M Davis 2015-01-08 02:12:10 UTC
We don't normally add aliases for functions like that, because it tends to just cause confusion to users and clutter in the library. And naming functions is a bit of an art which frequently has no right anwser and which tends to get bikeshedded to death due to how subjective it is and how easy it is to have an opinion on the matter.
Comment 2 Ketmar Dark 2015-01-08 08:26:31 UTC
besides, it's very easy to remember for posix-compatible os users. ;-)