6 ms·
While I really like thristian's explanation of why case insensitivity adds massive complexity to a system: (https://news.ycombinator.com/item?id=8876873 https:/
by kennywinker 12y ago
While I really like thristian's explanation of why case insensitivity adds massive complexity to a system: (https://news.ycombinator.com/item?id=8876873 https://news.ycombinator.com/item?id=8876873)
I have to point out that case sensitivity offloads a bunch of that complexity to the user. This is almost definitely why OS X uses case-insensitive HFS+ by default.
As a ultra-simple example: with a case-sensitive file system I can have two directories, "documents" and "Documents". Which one are my documents in? Half in one, half in the other, probably.
I'm not saying Linus at al. are wrong that case-sensitive is the way to go, but there are some reasonable arguments for trying to take that complexity back from the user and deal with it in the file system.
Source: I'm a long time mac user, and I just switched to a case-sensitive file system last year. The win of having my dev machine match my deployment environment (iOS) is bigger than any downsides I've seen yet.
- SwellJoe 12y agoI find case-insensitivity (as both Mac OS X and Windows do it) user-hostile. So, there's a counter-anecdote. But, I believe all that proves is that in many cases, "what I'm used to" is the same as "easy and intuitive". There is often no one true way to make something complex easy and intuitive, and sometimes the "easy way" is the way you're used to (but for someone used to another way, it won't be easy). In this case, in the absence of compelling evidence that case-insensitivity is a net win for the user, the simpler implementation is probably the right one. The number of bugs over the years caused by insensitivity and Unicode mapping and such, is probably further evidence favoring simplicity. Also, the average Mac user doesn't even know they have a command line (seriously, I can't remember ever saying to a casual Mac user, "Open terminal" and have them say anything other than, "I don't know what that is" or "I don't have that"). There's no reason a higher layer can't make case-insensitive decisions for the user (say, searching for "the clash" will find music by "The Clash"), which doesn't require the freaking filesystem to make those kinds of guesses. Having this happen at the filesystem layer has always seemed utterly mad, to me. And, having it happen at the higher layers is how Linux and UNIX software has always handled it. Somehow we muddle through with the filesystem being entirely naive about the letter "a" being sort of the same as "A" (for humans).
- wodenokoto 12y agoHow is it user hostile? I think it is very reasonable to say that common users of the Alphabet expects "Documents" and "documents" to be the same word. I think it is even safe to assume most readers consider "john" and "John" the same name, while "Jon" and "John" are not. I can't think of any situation where I have needed to have two differently capitalized files reside in the same folder, but I can remember dozen of times I've been annoyed by it. My point is, there are arguments to calling case-sensetivity for user hostile, but you don't present any to counter it.
- SwellJoe 12y agoMost visibly: Tab completion can get the wrong/unexpected file (note that it doesn't have to be the same filename to cause this problem...if I'm expecting "my<tab>" to complete to "my program", because it is the only file starting with "my" but instead it completes to "My Documents" or requires a double tab and more specificity from me, that's an annoyance). Windows tab completion is perhaps the perfect storm of annoyance for me, with regard to case insensitivity. It'll complete to the first thing it sees case insensitively and then require cycling through all matches to find the desired file. This would also break file globs, or at least my expectation of what file globs should do. This is, of course, a mild bit of user hostility, but it is less friendly and harder to use, to me, than case sensitivity. As I noted above, it's mostly a matter of what you're used to, but in the absence of a reasonable case that case insensitivity makes life easier for users, the right implementation is the simpler one. The more dangerous stuff is where the OS decides that one file is actually a different file, through character conversion or through Unicode mapping. And, that, (not) coincidentally, is where serious security bugs were found in git. And, git is not alone in running into these problems. In short, I find it annoying that the OS would decide it knows what I want, when I ask for something else. But, more importantly, it has been proven occasionally to be dangerous, and often to be error-prone, in implementation. But, on that front, I'm probably just going to repeat what Linus said less effectively.
- Camillo 12y agoIt doesn't do that on OS X.
- mikeash 12y agoCase insensitivity is a tiny part of the problem in my view. On a case insensitive filesystem you can still have distinct directories called Document, Documents, My Documents, Documnts, etc. and really, from the user's point of view, why can't you have two directories called Documents? The entire concept of addressing things by name is counterintuitive. Mapping strings that differ only by case into the same name is a teeny band-aid on a gaping wound.
- AnimalMuppet 12y agoBut from the user's point of view, if you have two directories called Documents, which one are you looking at? Or are you saying that the file system should merge them into one directory? Are you saying that the user should know which directory is which by something else, say position in a list (which could be re-ordered by user action)? By some icon associated with the list? What's your actual solution?
- mikeash 12y agoI don't have a specific solution, but whatever it is, it will be considerably different from what we as programmers understand a filesystem to be. It has to be something new. There's no point trying to put little band aids on filesystems to make them friendlier like this. In contexts where the user might have trouble with concepts like C != c, they shouldn't be exposed to raw filenames at all.
- restalis 12y agoWell, in the real world the same user meets a lot of similar dilemmas, like acquainting himself with people with the same name or encountering cars of the same model and color (and what happens then is that one starts to pay more attention to distinctions). Why does it have to be any simpler for data labels? Does that poor user have to be necessarily guarded to such a degree from the reality itself?
- tikhonj 12y agoFunnily enough, I've had the same thoughts about variable names. We expect case-sensitive variable names because that's what we're used to, but they're not obviously the right choice. I've worked on reasonably sized lisp projects with case-insensitive names with no detriment. Most of the time, having both a `foo` and a `Foo` identifier at the same time is a bad idea: it's hard to remember which is which. The only time it makes sense is when it's backed up by strong conventions: say, `foo` is a method and `Foo` is a class. With these conventions, you're not really remembering `foo` and `Foo`, you're remembering "`foo` method" and "`foo` class". In a sense, it's just a hack to have sigils use an otherwise unused part of the identifier, just like tagged pointers use the unused bits of a pointer for metadata. Using capitalization for sigils like this is fine, and works well in practice, but you could as easily use some other symbols in the same role. At the very least, it helps to have the conventions built right into your language (like Haskell) than just followed manually (like Java). Moreover, having significant capitalization outside the conventions (ie in the rest of the word) will still just be confusing: was is `subString` or `substring`? I don't know what the best solution is, but case sensitivity everywhere isn't it.
- wodenokoto 12y agoI've always thought case-sensitive variable names to be an odd thing. You allow your program to handle it and then tell the user to never ever use it.
- forgottenpass 12y agoAs a ultra-simple example: with a case-sensitive file system I can have two directories, "documents" and "Documents". Which one are my documents in? Half in one, half in the other, probably. This is a source of confusion, but filesystem convention is not the place to solve it because it can't solve it. I can still have three directories for bug #12 "ticket_12", "ticket12" and "ticket 12" Which one is my investigation in? Is documentation in "doc" or "docs"? etc...
- thomasahle 12y agoSpaces in filenames are terrible as well. Is it "Documents" or "Documents "? Perhaps one could calculate some sort of visual distance between filenames and not allow any two in the same folder, if their distance were less than some constant.
- fidotron 12y agoYou could tokenise them, and then compare the resulting list of tokens.
- justizin 12y ago"This is almost definitely why OS X uses case-insensitive HFS+ by default." See my other comment, whereby the Darwin team told me they use case-insensitive FS because Microsoft Office internally converts filenames to uppercase or lowercase at its' leisure, often several, if not tens of times during an operation. I could be wrong, the person / people I talked to could be incorrect, but I've never heard another explanation that was not speculation. Your reasoning all applies reasonably well to why Microsoft decided to buck the trend and go case insensitive, since case sensitive was the norm up until they came along afaik.
- Moto7451 12y agoAdobe products have had issues with HFS+ Case Sensitive FS for YEARS. It's part of why I moved away from them (along with not releasing patches for software 1-2 versions old on versions of OS X 1-2 versions newer). Here's a sample: http://tzvetkoff.net/posts/2013/05/20/adobe-cs6-on-case-sensitive-drives.html http://tzvetkoff.net/posts/2013/05/20/adobe-cs6-on-case-sens... http://superuser.com/questions/247920/install-adobe-cs5-on-mac-with-case-sensitive-filesystem http://superuser.com/questions/247920/install-adobe-cs5-on-m... http://thinkingdigitally.com/archive/adobe-photoshop-cs3-osx-case-sensitive-filesystem-fixed/ http://thinkingdigitally.com/archive/adobe-photoshop-cs3-osx...
- cmurf 12y agoFrom personal experience, Adobe applications have never worked on case-sensitive HFSX. Also with the legacy compatibility layers OS X shipped with up until 10.6, there were enough expectations on case-insensitivity that it was probably easier for them to just not risk a bunch of legacy apps not working anymore. And by the time 10.7 comes along there's enough momentum to just leave it alone. Their focus now is on Core Storage (an LVM like thing that doesn't have 1/2 the features of LVM), to the degree that now in 10.10 it's the default for both upgrades and new installations. So FWIW these volumes are no longer read/writable elsewhere like on linux or Windows.
- beedogs 12y ago> As a ultra-simple example: with a case-sensitive file system I can have two directories, "documents" and "Documents". Which one are my documents in? Half in one, half in the other, probably. That only really happens if you're an idiot who just haphazardly throws documents into any directory that looks like it can still hold files. And it's not an indictment of case sensitivity; you can achieve the same sort of stupidity in plenty of other ways if you're determined to do so.
- tedunangst 12y agoIdiot here. I like to save downloaded files in a directory called "downloads". Firefox has decided it would prefer to save them in a directory called "Downloads". I can tell Firefox to save them in the downloads directory, but sooner or later, it inevitably decides it's tired of that and goes back to saving them in Downloads.
- restalis 12y agoThat's just a problem with the application (and it just happens for that problem to be hidden by a case-insensitive file-system). For a solution, if you can't bend your application to your will, bend yourself to it and rename your "downloads" to whatever Firefox likes.
- Crito 12y agoI download my files into a directory called 'shit'. Maybe I need a filesystem that conflates 'shit' with 'Documents'.
- kennywinker 12y agoSomeone else has already commented to defend the idea that techy-people can get caught up by this, but I'd like to also point out that a massive portion of the market for computing devices is made up by people who are, by some measures, idiots. Just like how a large portion of the market for automobiles is made up of "idiots" with respect to engine rebuilding.
- 12y ago