Page 1 of 2

General Filename Poll

Posted: Thu Jun 29, 2006 2:45 pm
by ComputerPsi
Do you think file names should be case sensitive or non-case sensitive? When you post, please explain your reasoning.

Posted: Thu Jun 29, 2006 3:19 pm
by chase
Added the poll(wacky 3rd option was my idea).

I voted case sensitive, there is just too much chance of name collision with a case insensitive FS. I do think that the user interface(gui or cli) should be able to correct user supplied names for operations like opening files. And by correct I mean match on the closest case.

Posted: Thu Jun 29, 2006 5:42 pm
by |333173|3|_||3
chase wrote:I voted case sensitive, there is just too much chance of name collision with a case insensitive FS. I do think that the user interface(gui or cli) should be able to correct user supplied names for operations like opening files. And by correct I mean match on the closest case.
The correction is a good idea, but I would suggest having the UI bring up a list of letter matches (with the wrong case) if there is no filename with the right letters and cases, rather than guessing. this could be simpler, to implement, especially if folders are supported (the list would then only include the files within the current directory), since then as part of the metadata the filenmae in only lower (or upper, it dosen't matter) case, which the OS searches if the exact charecters do not match anything.

Posted: Thu Jun 29, 2006 6:35 pm
by carbonBased
case sensitive for sure.

Take this example from the (supposedly) user-friendly, Windows OS:

I make a file, and accidentally name it:
THe Bestest FIle ever.txt

I clearly made a casing error. Try to change this casing in windows and it'll complain that the source and destination are the same file, and fail. A non-computer user doesn't understand why this is (yes, this could be special cased to fixed...)

I do believe that the OS should be smart enough to make suggestions if it finds a matching file, but with incorrect casing. I also believe that the OS/shell should even be able to find files that are similar (ie, performing something similar to an SQL SOUNDEX() macro on the filename and giving similar results seems like a good idea to me).

One disadvantage to case senstive filenames, however, is intricate filenames, with lots of different casing. Representing these files in a shell can often be difficult. However, with command line completion, and the intelligent-case-guessing mentioned above, this can be overcome.

--Jeff

Posted: Thu Jun 29, 2006 7:07 pm
by ComputerPsi
I clearly made a casing error. Try to change this casing in windows and it'll complain that the source and destination are the same file, and fail. A non-computer user doesn't understand why this is (yes, this could be special cased to fixed...)
That was a small bug.. it's not present in the new versions.
I voted case sensitive, there is just too much chance of name collision with a case insensitive FS.
One disadvantage to case senstive filenames, however, is intricate filenames, with lots of different casing.
..I don't about you guys but I would get more confused over test and Test, than test1 and test2. In any case, I still don't understand why you need to would have a specific need to have case sensitive files. I think name collisions would occur more with files that have the same spelling. You would sometimes forget and have to open each file to see which is the one you want.
In windows, a file may be called in some cool way like "TheRules.txt" ..when I'm looking at the file, I don't care about it's case.. I just want to open it..

Posted: Fri Jun 30, 2006 4:44 am
by ComputerPsi
What is "non-existent (Metadata based FS)"? How does it work?

Posted: Fri Jun 30, 2006 7:59 am
by JAAman
i have to say case aware -- that means the files can freely mix capitalization as the user wishes, but capitalization doesnt change the file name -- it makes it much easier to search and type filenames -- and avoids "same name" confusion when 2 different files have the same name differing only in capitalization


@carbonbased:
i hold you in high regard and it surprises me that you would make such a claim, holding an entire concept guilty for a single (short lived) bug in a single implementation of the concept

the capitalization issue was only present in a single release (afaik), was a bug, and was corrected a very long time ago (i change capitalization in my filenames constantly -- many times every day, and i can tell you it doesnt exist)

Posted: Fri Jun 30, 2006 12:11 pm
by gaf
JAAman wrote:I have to say case aware -- that means the files can freely mix capitalization as the user wishes, but capitalization doesnt change the file name
But isn't that actually case unaware ? A case-sensitive operating system compares the strings directly, a case-unaware system runs tolower() first..

cheers,
gaf

Posted: Fri Jun 30, 2006 12:32 pm
by carbonBased
JAAman wrote: @carbonbased:
i hold you in high regard and it surprises me that you would make such a claim, holding an entire concept guilty for a single (short lived) bug in a single implementation of the concept
It's true, it's a fairly petty thing to say, in retrospect. As I mentioned, it's a fairly easy thing to work-around (I was under the impression this bug has existed for some time? No? I only use windows at work, so I can't say, myself).

Other advantages, that I can see, of case sensitivity involve certain applications and/or languages.

A database (I believe Netscape did this with its cache, in the past) might use the name of the file as a hash key, or similar meta data. Casing could be very relevant in this case.

Certain languages (Java, for example) require the filename to be equivalent to the class name. MyClass and myClass are both valid, and different classes, in Java, but not filenames, in a case-insensitive filesystem.

Case sensitive file systems allow certain files to be sorted above others, depending on sorting criteria (ie, INSTALL and README files).

One last reason, perhaps, is the ability to interface with other OSs/filesystems that are case sensitive (like most/all (?) unices).

Of course, anybody reading this can also say that an application can work-around any of these "limitations;" programmers shouldn't write code that uses casing like that; a case-insensitive filesystem can also sort INSTALL and README files above others if it saves the users casing properly, and who cares about unix compatibility (directories really shouldn't be named like that anyway, really)... and that's entirely true, as well.

I guess my only real reason for liking case-sensitive is that it allows more possibilities *if* an application can take advantage of it. Also, keep in mind that, in my mind, the two are absolutely identical until someone does actually produce files of names "File" and "file," for example. I say this because my idea of a case sensitive file system allows for this, but can also act in a case insensitive manor. The file system layer would be smart enough to realize that if I said "file" but only "File" exists, I probably mean "File." Although... I guess by this token, I'm voting more for case-insensitive... with the option of sensitivity :)

Oh, and btw... about the meta-data... is the meta-data case sensitive or insensitive? ;)

--Jeff

Posted: Fri Jun 30, 2006 2:18 pm
by chase
ComputerPsi wrote:What is "non-existent (Metadata based FS)"? How does it work?
Most likely with a database. Files wouldn't have names and there wouldn't even be directories. Files would have metadata(think the type of stuff storied in an inode), there are actually some official metadata specs that I can look up but basically files would have properties like title, category(many possibly), date-time, etc. Your UI could present "folders" is you wanted for the different categories but files could easily exist in multiple categories. If you've seen a website where you can "tag" pictures or stories it's kinda like that.
carbonBased wrote:Oh, and btw... about the meta-data... is the meta-data case sensitive or insensitive? ;)
:P
Actually the whole idea of case really wouldn't matter. Since there is no filename there is no collision anymore. There's a lot of search ability that has to be built in to the UI for a metadata FS so if you don't get unique enough with something like title you'd get either a list or prompting for more search criteria.

Posted: Fri Jun 30, 2006 4:55 pm
by rexlunae
gaf wrote:
JAAman wrote:I have to say case aware -- that means the files can freely mix capitalization as the user wishes, but capitalization doesnt change the file name
But isn't that actually case unaware ? A case-sensitive operating system compares the strings directly, a case-unaware system runs tolower() first..

cheers,
gaf
No. He is saying, I think, case preservative and case insensitive. It means that when the filename is set, the filesystem retains the case, but you do not have to match case to refer to the file. This is pretty much how windows works.

This is my preference as well. I think it's pretty dubious to support having multiple files in the same directory with names differing only by case, but I like to have the case I specified remembered.

Posted: Fri Jun 30, 2006 5:20 pm
by chase
rexlunae wrote:
gaf wrote:
JAAman wrote:I have to say case aware -- that means the files can freely mix capitalization as the user wishes, but capitalization doesnt change the file name
But isn't that actually case unaware ? A case-sensitive operating system compares the strings directly, a case-unaware system runs tolower() first..

cheers,
gaf
No. He is saying, I think, case preservative and case insensitive. It means that when the filename is set, the filesystem retains the case, but you do not have to match case to refer to the file. This is pretty much how windows works.

This is my preference as well. I think it's pretty dubious to support having multiple files in the same directory with names differing only by case, but I like to have the case I specified remembered.
So would it be a case insensitive filesystem with the case sensitive name stored in something like an inode or would the filesystem be case sensitive and the fopen type calls would insure that the file could be open regardless of case and make sure there are no case insensitve duplicate names in a dir? With the second you could make it case sensitive later...

EDIT: Before someone tells me both of these are case sensitive filesystems...the "case" of a filesystem(to me) is defined by what is stored in the directory entries assuming a standard BSD FFS/EXT2-3/UFS type of fs.

Next poll, what's better: toupper or tolower ;)

Posted: Fri Jun 30, 2006 5:30 pm
by rexlunae
chase wrote:
So would it be a case insensitive filesystem with the case sensitive name stored in something like an inode or would the filesystem be case sensitive and the fopen type calls would insure that the file could be open regardless of case and make sure there are no case insensitve duplicate names in a dir? With the second you could make it case sensitive later...

Next poll, what's better: toupper or tolower ;)
I would only store the case sensitive name. When fopen or whatever is run, I would check the directory for name conflicts using to(upper|lower). I don't even really see the benefit of storing a pre-converted name.

Posted: Fri Jun 30, 2006 5:49 pm
by chase
rexlunae wrote: I would only store the case sensitive name. When fopen or whatever is run, I would check the directory for name conflicts using to(upper|lower). I don't even really see the benefit of storing a pre-converted name.
On average most of the time you'll be opening existing files instead of creating new ones. Storing the preconverted name allows us to drop half of the to(upper|lower) calls.

Posted: Fri Jun 30, 2006 8:31 pm
by Shark8
chase wrote: Next poll, what's better: toupper or tolower ;)
ToUpper, of course. You see, it's really a necesity now, simply because *nix (and derivitives) have depleted our stores of lower-cased characters. ;)