I recall a case-insensitivity bug from the early days of Mac OS X.
There are three command-line utilities that are distributed as part of the Perl HTTP library:
GET
,HEAD
, andPOST
. These are for performing the HTTP operations of those names from the command line.But there’s also a POSIX-standard utility for extracting the first few lines of a text file. It’s called
head
.I think you see where I’m going with this.
HEAD
andhead
are the same name in a case-insensitive filesystem such as the classic Mac filesystem. They are different names on a Unix-style filesystem.Installing
/usr/bin/HEAD
fromlibwww-perl
onto a Mac with the classic filesystem overwrote/usr/bin/head
and broke various things.Case insensitive is more intuitive and MUCH safer.
You do not want every Windows user to live in a world where Office.exe, office.exe, Offlce.exe and 0fflce.exe are all different files.
OSs and filesystems aren’t built for programmers, they’re built for grandmas. Programmers just happen to use them. It’s much more sensible to give programmers a harder time fixing bugs and incompatibilities than it is to make the user experience even marginally worse.
I mean, all due respect for the guy, but that is an absolutely terrible opinion and I will die on this hill.
Your grandma will never type file names in shell, she’ll use Open File dialog, where case sensitivity does not matter.
Damn straight. I thought bcachefs was a modern filesystem? Why is it case insensitive? Huge red flag.
It isn’t normally, but it, like e.g. Ext4, allows case insensitivity mostly for the sake of Wine.
But Wine could handle the case insensitivity though? NTFS is case sensitive.
It does, but having case insensitivity in the file system can get you better performance.
How would that happen?
If you’re running Wine on a case-sensitive file system, and you it tries to open a file, it would first try to open a file whose case matches exactly. But if it doesn’t find one, it would then need to list all the files in the directory, normalize their case, and go through them all to see if there is a file with the given name but in a different case. That can take some time if there is a lot of files in the directory.
But if you’re on a case-insensitive filesystem, the FS can keep case-normalized names of all files on disk, so you can do a case-insensitive open just as fast as you can do a case-sensitive open.
BTW, another application that can benefit from this is Samba, since SMB is case-insensitive.
That –at best– gives you the same performance.
EDIT: Ok, I misunderstood – you meant the performance of “case insensitive in kernel” vs. “case insensitive in userspace”. I get your point now.