Issue 7222 in pharo: FileSystemDirectoryEntry method name consistency

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 7222 in pharo: FileSystemDirectoryEntry method name consistency

pharo
Status: New
Owner: ----
Labels: Milestone-2.0 Type-Bug

New issue 7222 by [hidden email]: FileSystemDirectoryEntry method name  
consistency
http://code.google.com/p/pharo/issues/detail?id=7222

FileSystemDirectoryEntry #basename is inconsistent with #fullName.

FileSystem also uses naming such as,  #childNamesAt: and #pathName.

It is also inconsistent with almost every other use of #baseName in the  
image. In fact I did not see any other non #baseName use




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7222 in pharo: FileSystemDirectoryEntry method name consistency

pharo
Updates:
        Status: Accepted
        Labels: -Milestone-2.0 Milestone-3.0

Comment #1 on issue 7222 by [hidden email]: FileSystemDirectoryEntry  
method name consistency
http://code.google.com/p/pharo/issues/detail?id=7222

To be fixed in 3.0


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7222 in pharo: FileSystemDirectoryEntry method name consistency

pharo

Comment #2 on issue 7222 by [hidden email]: FileSystemDirectoryEntry  
method name consistency
http://code.google.com/p/pharo/issues/detail?id=7222

Consistency 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/pathname

any, 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