• Australis13@fedia.io
    link
    fedilink
    arrow-up
    139
    arrow-down
    6
    ·
    3 months ago

    This is one case where I think Windows is appropriately designed for its target audience.

    • stoy@lemmy.zip
      link
      fedilink
      arrow-up
      52
      arrow-down
      6
      ·
      3 months ago

      I don’t really see the benefit of allowing users to create files with the same name in the same directory, yeah, yeah I know that case sensitivity means that it isn’t same name, but imagine talking to a user, guiding them to open the file /tmp/doc/File and they open /tmp/doc/file instead

      • MartianSands@sh.itjust.works
        link
        fedilink
        arrow-up
        14
        ·
        3 months ago

        The reason, I suspect, is fundamentally because there’s no relationship between the uppercase and lowercase characters unless someone goes out of their way to create it. That requires that the filesystem contain knowledge of the alphabet, which might work if all you wanted was to handle ASCII in American English, but isn’t good for a system which needs to support the whole world.

        In fact, the UNIX filesystem isn’t ASCII. It’s also not unicode. UNIX uses arbitrary byte strings, with special significance given to a very small number of bytes (just ‘/’ and ‘\0’, I think). That means people are free to label files in whatever way they like, and their terminals or other applications are free to render them in whatever way seems appropriate, without the filesystem having to understand unicode.

        Adding case insensitivity would therefore actually be significant and unnecessary complexity to add to the filesystem drivers, and we’d probably take a big step backwards in support for other languages

      • Damage@feddit.it
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        Let’s say you have a software that generates randomly named files, having the ability to use both upper case and lower case means you can have more files with the same amount of characters, but that sounds horrible and it’s the only thing I can think of atm

    • DefederateLemmyMl@feddit.nl
      link
      fedilink
      arrow-up
      25
      arrow-down
      10
      ·
      edit-2
      3 months ago

      This isn’t “Windows design”… this is just inherited stone age bullshit from the DOS days when the filesystem was FAT16 and all file names were uppercase 8.3.

      NTFS is case sensitive in its underlying design, but was made case insensitive by default, yet case preserving, for reasons of backwards compatibility.

      If Microsoft has to design something from scratch, without the need for backwards compatibility, they go for case sensitive themselves. For example: Azure Blob Storage has case sensitive file names.

      • Redjard@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        2
        ·
        3 months ago

        If you rename a file only changing the casing it doesn’t update properly, you need to rename it to something else and back.
        This is so userfriendly I have been stumped by it multiple times.

        On the other hand in using Linux I have had a number of problems with the casing of files: The number is 0

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          arrow-up
          2
          ·
          3 months ago

          If you rename a file only changing the casing it doesn’t update properly, you need to rename it to something else and back. This is so userfriendly I have been stumped by it multiple times.

          To my great surprise, this has been fixed. I don’t know when, but I tried it on my Windows 10 VM and it just worked. Only took them 20 years or so :)

      • dan@upvote.au
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        case insensitive by default, yet case preserving

        This isn’t just a Windows thing… It’s the same on MacOS by default.

    • gravitas_deficiency@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      3 months ago

      macOS also does this by default, but you can change it (though you have to reformat the disk in question). This is generally fine for non-system disks if you REALLY need it for some reason, but afaik it is not recommended for the OS disk due to assumptions that macOS-targeted binaries make (similar to the windows regex version matching that caused problems for a while because it became the unofficial best way to check windows versions for app install compatibility). It’s doubly annoying on newer Apple systems because the integrated SSDs are WAY faster than pretty much anything else you can connect to it. But for the most part, I find it’s more of a nuisance to keep in mind than a real problem (I’ve been dealing with dev-issue MBPs since about 2012).

      As in the windows case, this is also an appropriate choice for the average Apple user (though the fact that they’re fairly ubiquitous as dev machines in many places is annoying on several levels, despite the generally solid best-case performance and thermals I’ve observed).

      • bdonvr@thelemmy.club
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        Huh I had thought case-sensitive was default on APFS/HPFS and you had to choose insensitive specifically but I guess not

        • gravitas_deficiency@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          3
          ·
          3 months ago

          Just checked on my work box - if you go into Disk Utility and start the process to add a volume, the default selection is APFS, and there’s an option in the dropdown for for APFS (Case-sensitive)

  • FQQD@lemmy.ohaa.xyz
    link
    fedilink
    English
    arrow-up
    79
    arrow-down
    3
    ·
    edit-2
    3 months ago

    It’s neat that Linux has the ability to do this, but I honestly can’t think of a good usecase for this. I think this is more confusing than it is useful

        • OrganicMustard@lemmy.world
          link
          fedilink
          arrow-up
          14
          ·
          3 months ago

          Create multiple branches that only differ in cases from a Unix OS so it breaks git for Windows users in the same project.

          • TrickDacy@lemmy.world
            link
            fedilink
            arrow-up
            6
            ·
            3 months ago

            We had a repo with some really weird (filename) case issues on Mac also. I could only fix it on my home Linux machine, by deleting all the affected files, committing that, then restoring them with all lowercase names. Only time I’ve dealt with that in 20 years but it can happen!

    • gramie@lemmy.ca
      link
      fedilink
      arrow-up
      7
      ·
      3 months ago

      I feel the same way about programming languages. There is no way that “User” and “user” should refer to different variables. How many times has that screwed people up, especially in a weekly typed language?

      One of the many things that I feel modern versions of Pascal got right.

      • Serinus@lemmy.world
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        edit-2
        3 months ago

        Nope. Completely different.

        Case is often used to distinguish scope. Lowercase is local while uppercase is public. “Name = name” is a pretty standard convention, especially in constructors.

        There is a ubiquitous use case in programming. There is not in the file system.

        • gramie@lemmy.ca
          link
          fedilink
          arrow-up
          3
          ·
          3 months ago

          My point is not about how case is meant to be used my point is that it is very easy to make a mistake that is difficult to spot. I think it makes a lot more sense to the case insensitive, and force different names to be used.

    • Kusimulkku@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      I think if you can write them in two different ways it should consider them two different things

    • 5714@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      It’s quite useful for stuff like PROGRAM and Program in the same directory where PROGRAM is the program itself and Program is some unrelated files about the program. Bad example, but the case stands.

      • redisdead@lemmy.world
        link
        fedilink
        arrow-up
        0
        arrow-down
        1
        ·
        3 months ago

        So what you’re telling me is that it’s useful when the software you use is made by absolute idiots?

        • 5714@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          1
          ·
          3 months ago

          It’s not about software. Program, PROGRAM were just placeholders for content. I know you can think more abstract and argue in better faith than this.

  • mrvictory1@lemmy.world
    link
    fedilink
    arrow-up
    40
    arrow-down
    1
    ·
    3 months ago

    Windows and NTFS support case sensitive filenames. The functionality is disabled for compatibility reasons.

  • DefederateLemmyMl@feddit.nl
    link
    fedilink
    arrow-up
    35
    arrow-down
    1
    ·
    3 months ago

    Even more annoying is that it’s very cumbersome to change the case of a file once you’ve created it.

    If you accidentally create fIle.txt when you meant File.txt, the rename function does nothing … and it will keep displaying as fIle.txt. You have to rename it to something else entirely, then rename it back to the original name with the intended case.

  • arthurpizza@lemmy.world
    link
    fedilink
    English
    arrow-up
    32
    ·
    3 months ago

    I can make a file named COM1 on Linux. That’s on the forbidden list for Windows.

    The forbidden list:

    • CON
    • PRN
    • AUX
    • CLOCK$
    • NUL
    • COM1
    • COM2
    • COM3
    • COM4
    • COM5
    • COM6
    • COM7
    • COM8
    • COM9
    • LPT1
    • LPT2
    • LPT3
    • LPT4
    • LPT5
    • LPT6
    • LPT7
    • LPT8
    • LPT9
    • cygnus@lemmy.ca
      link
      fedilink
      arrow-up
      3
      ·
      3 months ago

      LPT1 LPT2 LPT3 LPT4 LPT5 LPT6 LPT7 LPT8 LPT9

      Why does Microsoft hate Life Pro Top listicles?

    • lud@lemm.ee
      link
      fedilink
      arrow-up
      3
      ·
      3 months ago

      That’s because Windows is generally very backwards compatible.

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          arrow-up
          3
          ·
          3 months ago

          The thing is, a lot of the legacy backwards compatible stuff that’s in Linux is because a lot of things in Unix were actually pretty well thought out from the get go, unlike many of the ugly hacks that went into MSDOS and later Windows and overstayed their welcome.

          Things like: long case sensitive file names from the beginning instead of forced uppercase 8.3 , a hierarchical filesystem instead of drive letters, “everything is a file” concept, a notion of multiple users and permissions, pre-emptive multitasking, proper virtual memory management instead of a “640k is enough” + XMS + EMS, and so on.

          • BCsven@lemmy.ca
            link
            fedilink
            arrow-up
            3
            ·
            3 months ago

            It still amazes me how well thought out unix was for the era when computing was in its infancy. But I guess that is what you get with computer science nerds from Universities and a budget for development based on making a product the goal, not quarterly profit the goal.

            • superkret@feddit.org
              link
              fedilink
              arrow-up
              3
              ·
              edit-2
              3 months ago

              It’s what you get when you design an OS for a mainframe computer that is accessed by many users sharing its resources.
              DOS was designed for single-user PC’s with very limited processing power, memory and storage, and no access to networked drives. Lots of its hacks and limitations saved a few hundred bytes of memory, which was crucial at the time.

          • the_crotch@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            3 months ago

            Unix was designed for mainframes, qdos/msdos was designed to be a cpm knockoff the local nerd could use to play commander keen and do his taxes. It’s actually impressive how much modern/business functionality they were able to cram into that.

            • DefederateLemmyMl@feddit.nl
              link
              fedilink
              English
              arrow-up
              1
              ·
              3 months ago

              Unix was designed for mainframes

              Unix was never for mainframes. It was for 16-bit minicomputers that sat below mainframes, but yes they were more advanced than the first personal computers.

              It’s actually impressive how much modern/business functionality they were able to cram into that.

              Absolutely, but you have to admit that it’s a less solid foundation to build a modern operating system on.

              In the 80s, there were several Unices for PC too btw: AT&T, SCO, even Microsoft’s own Xenix. Most of them were prohibitively expensive though.

    • MudMan@fedia.io
      link
      fedilink
      arrow-up
      29
      arrow-down
      9
      ·
      3 months ago

      Yeah, right? Are we pretending that having case sensitive file names isn’t a bad call, or…? There are literally no upsides to it. Is that the joke?

      • RandomLegend [He/Him]@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        26
        arrow-down
        3
        ·
        3 months ago

        I’m with you here, i find it infuriating and i never ever had the situation where this was beneficial.

        Like who tf actually creates a File.txt, file.txt AND FILE.TXT in one place and actually differentiates them with that.

        • MudMan@fedia.io
          link
          fedilink
          arrow-up
          8
          arrow-down
          2
          ·
          3 months ago

          I mean, it’s less of an issue on Linux for both design and user profile reasons, but imagine a world where somebody can send all the normie Windows users a file called Chromesetup.exe to sit alongside ChromeSetup.exe. Your grandma would never stop calling you to ask why her computer stopped working, ever.

        • macniel@feddit.org
          link
          fedilink
          arrow-up
          4
          arrow-down
          1
          ·
          3 months ago

          Isn’t it less strain on the Filesystem? keeping a sanitised filename next to the actual filename surely has some drawbacks.

        • dev_null@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          3 months ago

          For example I might store blobs of data processed by my database in files that have the Base64 ID of the blob as the filename. If the filesystem was case insensitive, I’d be getting collisions.

          Users probably don’t make such files, no. But 99% of files on a computer weren’t created by the user, but are part of some software, where it may matter.

          And often software originally written for Linux or macOS and then ported to Windows ends up having problems due to this.

      • Lucy :3@feddit.org
        link
        fedilink
        arrow-up
        5
        ·
        3 months ago

        For files of casual users it might be of benefit. They don’t care about capitalization. For system files, I find it pretty weird to name them with random capitalization, and it’s actually pretty annoying. Only lower- (or upper-)case would be ok tho.

        • MudMan@fedia.io
          link
          fedilink
          arrow-up
          8
          ·
          3 months ago

          Well, camel case does help readability on file names. But I guess that’s the point of case insensitive names, it doesn’t matter. However you want to call them will work.

    • huginn@feddit.it
      link
      fedilink
      arrow-up
      9
      ·
      3 months ago

      CMV: all Linux files should be case insensitive, displayed as lowercase and mandatory snake_case.

  • radamant@lemmy.world
    link
    fedilink
    English
    arrow-up
    35
    arrow-down
    14
    ·
    3 months ago

    Windows way is superior, in my opinion. I don’t think there’s a need for File.txt and fILE.txt

    • lily33@lemm.ee
      link
      fedilink
      arrow-up
      15
      arrow-down
      1
      ·
      edit-2
      3 months ago

      Indeed. Linux audio also allows control characters like backspace to be part of a file name (though it is harder to make such file as you can’t just type the name). Which is just horrible.

    • DefederateLemmyMl@feddit.nl
      link
      fedilink
      arrow-up
      15
      arrow-down
      5
      ·
      3 months ago

      I don’t think there’s a need for File.txt and fILE.txt

      It’s not so much about that need. It’s about it being programmatically correct. f and F are not the same ASCII or UTF-8 character, so why would a file system treat them the same?

      Having a direct char type to filename mapping, without unnecessary hocus pocus in between, is the simple and elegant solution.

      • Serinus@lemmy.world
        link
        fedilink
        arrow-up
        5
        arrow-down
        2
        ·
        3 months ago

        It turns out that the easiest thing to program isn’t always the best application design.

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          1
          ·
          edit-2
          3 months ago

          I would argue that elegance and being easy to program are virtues by themselves, because it makes code easy to understand and easy to maintain.

          A one-to-one string to filename mapping is straightforward and elegant. It’s easy to understand (“a filename is a unique string of characters”), it makes file name comparisons easy (a bit level compare suffices) and as long as you consistently use the case that you intend, it doesn’t behave unexpectedly. It really is the way of the least surprise.

          After all, case often does have meaning, so why shouldn’t it be treated as a meaningful part of a filename? For example: “French fries.jpg” could contain a picture of fries specifically made in France, whereas “french fries.jpg” could contain a picture of fries made anywhere. Or “November rain.mp3” could be the sound of rain falling in the month of November, whereas “November Rain.mp3” is a Guns N’ Roses song. All silly examples of course, but they’re merely to demonstrate that capitalization does have meaning, and so we should be able to express that canonically in filenames as well.

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          arrow-up
          8
          arrow-down
          3
          ·
          edit-2
          3 months ago

          Because it’s designed for average people

          It is not. It is designed for all purposes, automated processes and people alike. A filesystem is not just for grandma’s Word documents.

          And even people’s names are case sensitive. My name has the format Aaa Bbb ccc Ddd. It is not the same as the person with the name Aaa Bbb Ccc Ddd, who also exists. So why shouldn’t file names be?

            • DefederateLemmyMl@feddit.nl
              link
              fedilink
              English
              arrow-up
              4
              arrow-down
              4
              ·
              edit-2
              3 months ago

              give me one use case where it makes sense having several files with the same name but different cases in the same directory

              Imagine a table in a database where the primary key is a case sensitive character field, because you know varchars, just like C char types and string types in other languages are case sensitive.

              Imagine a database administrator does the following:

              • Export all data with primary key = ‘Abcde’ to ‘Abcde.csv’

              Imagine a second database adminstrator around the same time does the following:

              • Export all data with primary key = ‘abcde’ to ‘abcde.csv’

              Now imagine this is the GDPR data of two different users.

              If you have a case insensitive file system, you’ve just overwritten something you shouldn’t have and possibly even leaked confidential data.

              If you have a case sensitive file system you don’t have to account for this scenario. If the PK is unique, the filename will be unique, end of story.

                • DefederateLemmyMl@feddit.nl
                  link
                  fedilink
                  English
                  arrow-up
                  5
                  arrow-down
                  1
                  ·
                  3 months ago

                  The point is you have to take this into account, so the decision to go with a case insensitive file system has ripple effects much further down your system. You have to design around it at every step in code where a string variable results in a file being written to or read from.

                  It’s much more elegant if you can simply assume that a particular string will 1-on-1 match with a unique filename.

                  Even Microsoft understands this btw, their Azure Blob Storage system is case sensitive. The only reason NTFS isn’t (by default) is because of legacy. It had to be compatible with all uppercase 8.3 filenames from DOS/FAT16.

  • 9point6@lemmy.world
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    3 months ago

    Oh it’s even better, windows explorer can’t really do case sensitive

    But NTFS is a case sensitive file system

    This occasionally manifests in mind boggling problems

  • SwingingTheLamp@midwest.social
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    1
    ·
    edit-2
    3 months ago

    Case-sensitive is easier to implement; it’s just a string of bytes. Case-insensitive requires a lot of code to get right, since it has to interpret symbols that make sense to humans. So, something over wondered about:

    That’s not hard for ASCII, but what about Unicode? Is the precomposed ç treated the same lexically and by the API as Latin capital letter c + combining cedilla? Does the OS normalize all of one form to the other? Is ß the same as SS? What about alternate glyphs, like half width or full width forms? Is it i18n-sensitive, so that, say, E and É are treated the same in French localization? Are Katakana and Hiragana characters equivalent?

    I dunno, as a long-time Unix and Linux user, I haven’t tried these things, but it seems odd to me to build a set of character equivalences into the filesystem code, unless you’re going to do do all of them. (But then, they’re idiosyncratic and may conflict between languages, like how ö is its letter in the Swedish alphabet.)

  • Harold_Penisman@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    2
    ·
    edit-2
    3 months ago

    What a tragedy. Giving files slightly different names seems far more organized and logical than having several files with the same name and different capitalization. Really seems like a non-issue to me.

    • Sonotsugipaa@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      2
      ·
      3 months ago

      I’ve used Windows for a bit more than a decade, and I only found out its VFS is case-insensitive (by default) after I fully ditched the OS, when a bunch of Electron applications created directories with different cases - nothing ever broke because of it, save for a single Godot game.

      Personally, I think case-insensitivity seldom makes sense, though I’m also aware that not everyone [knows how / is able] to properly operate a keyboard.

  • object [Object]@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    10
    ·
    3 months ago

    Fun things happen whenever you upload 2 files with the same names, but differently capitalized letters to a Nas from a linux box, and then try to delete one of them from windows. It broke so hard I actually got a bsod…

    • Nyoka@lemm.ee
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      3 months ago

      Yeah as someone who uses both this is really not much of a feature.

  • mogoh@lemmy.ml
    link
    fedilink
    arrow-up
    9
    ·
    3 months ago

    To my knowledge since Windows 10, files can be case sensitive. It is still tricky to setup, but it won’t break.

    • SpaceNoodle@lemmy.world
      link
      fedilink
      arrow-up
      10
      arrow-down
      1
      ·
      3 months ago

      Nah, Windows still fucks it up. I was forced to use Windows 11 for a code generation tool from a chip vendor the other week and it screwed everything up by inserting references to a directory with different cases than how it was actually created.

      • AnyOldName3@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        3 months ago

        That’s more likely to be the tool assuming it’s running on a case-insensitive filesystem than it is Windows breaking anything. If you mount networked storage running on a case-sensitive machine, that’s something that’s worked fine in Windows for a very long time.

      • ramble81@lemm.ee
        link
        fedilink
        arrow-up
        11
        ·
        3 months ago

        Look at a lot of postings in the “insanepeoplefacebook” community. There are a lot of “sovereign citizens” who believe that when you’re born the government makes a corporation using the all caps version of your name. And that the case sensitivity of how your name appears on bills matters as they’re distinctly different people.

  • palordrolap@fedia.io
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    3 months ago

    Thought experiment: Would you expect a programming language variable name to be case insensitive?

    That is, if you set foo = 1 and then print FOO, what should happen? Most programming languages throw an error.

    Is this even comparable with filenames, which are, after all, basically variable names that hold large quantities of data?

    If there is a difference, is it the fact it’s a file, or - for a mad idea - should files with only a few bytes of data retain case insensitivity? And if that idea is followed through, where’s the cutoff? 256 bytes? 7?

    (Anyway, Windows filenames are case sensitive, in a sense. If you save “Letter to Grandma.txt” it will retain those two capital letters and all the lower case letters exactly as they are. It won’t suddenly change to “LETTER to Grandma.txt”, despite the fact that if you try to open a file by that name, you’ll get the same file.)

    • wizardbeard@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      3 months ago

      PowerShell variable names and function names are not case sensitive.

      I understand the conventions of using capitalization of those names having specific meanings in regards to things like constants, but the overwhelming majority of us all use IDEs now with autocomplete.

      Personally, I prefer to use prefixes anyway to denote that info. Works better with segmenting stuff for autocomplete, and has less overhead of deriving non-explicit meaning from stuff like formatting or capitalization choices.

      On top of that, you really shouldn’t be using variables with the same name but different capitalization in the same sections of code anyway. “Did I mean to use $AGE, $Age, or $age here?” God forbid someone come through to enforce standards or something and fuck that all up.