Comment #2 on issue 7222 by
[hidden email]: FileSystemDirectoryEntry
method name consistency
http://code.google.com/p/pharo/issues/detail?id=7222Consistency is important to consider, but another view of it is that
#basename is correct and #pathName is the inconsistent one that should be
#pathname.
As a point of debate, the purpose of Smalltalk's camelCase is to make
readable the concatenation of *individual* words without spaces between
them. This does not necessarily mean existing whole words should be split
into camel case just because subWords can be identified.
For example 'surname' would not seem right as 'surName', nor 'corkscrew'
as 'corkScrew' nor 'skyscraper' as 'skyScraper'.
Try googling with double-quotes surrounding each of "basename" and "base
name" to compare the counts, then also "fullname" and "full name". You can
see
http://en.wiktionary.org/ listing basename, pathname, filename
individually but not fullname.
Searching general prose such as [1] you can
see, 'pathname', 'filename', 'basename' are commonly used as whole words.
I assume 'basename' serves that same purpose as defined by POSIX. So why
vary call it 'baseName' when it is doing 'basename' . When I look
at 'baseName' it just doesn't seem right. I don't automatically
know-in-my-bones what baseName does that same way I know what basename
should do, and I think some others would feel the same.
Personally, the existing choice of #basename is correct, and actually
#pathName should be changed to #pathname because this is commonly used as a
single whole word rather than two single words separated by spaces.
[1]
http://pubs.opengroup.org/onlinepubs/009604599/basedefs/xbd_chap04.html[2]
http://foldoc.org/pathnameany, just a counter-point view. It is not going to greatly affect me
either way.
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker