TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What Mac OS’s case-insensitive filenames teaches us

3 pointsby paulbjensenover 5 years ago

5 comments

latchkeyover 5 years ago
The filesystem is case preserving.<p><a href="http:&#x2F;&#x2F;www.informit.com&#x2F;articles&#x2F;article.aspx?p=1144082&amp;seqNum=4" rel="nofollow">http:&#x2F;&#x2F;www.informit.com&#x2F;articles&#x2F;article.aspx?p=1144082&amp;seqN...</a>
miklover 5 years ago
It’s not just macOS, Windows has the same, with all the same associated problems.<p>For that reason, I generally prefer to keep all file names consistently lower-case - user_account.ex over UserAccount.ex. It’s just as easy to read, if not more so.<p>We have enough other things to worry about as programmers without having to think about correct capitalisation of file names.
michalcover 5 years ago
I think it also teaches that Postel’s robustness principle isn’t always a good thing.<p>If the MacOS filesystem was not case-insensitive, i.e. it was _less_ liberal with what it accepted, the reported issue wouldn’t have happened.
nkristoffersenover 5 years ago
Ran into this issue with CI and git. Was so difficult to track down. Now all Macs on my team are reformatted to be case sensitive because of this. Thankfully it&#x27;s an option now.
评论 #21490974 未加载
评论 #21491080 未加载
ikrtxover 5 years ago
This is written as if it was some kind of lesson on philosophy. Why were you even using uppercase letters in your file names to begin with?
评论 #21491326 未加载