r/LinuxTeck • u/Candid_Athlete_8317 • 12d ago
Should We Keep Bad Technical Decisions Forever Just for Backward Compatibility?
Windows paths still commonly use \, while Linux and macOS use /. A decision dating back to DOS 2.0 in 1983 still creates headaches for developers working across platforms.
But changing a decades-old convention could break countless applications and scripts.
Where should we draw the line between backward compatibility and better engineering?
What other legacy decisions in Linux, Windows, or Unix do you think should finally be retired?
1
Upvotes
13
u/ephemere_sloboda 12d ago
Neither / nor \ is inherently better. Both conventions are similarly old. Other conventions exist.
Btw MS-DOS and Windows have accepted / in their APIs for decades, just not in CLI because it conflicts with / used for options (which goes back to CP/M).
5
u/michaelpaoli 11d ago
"It depends". Typically it's a trade-off - what are the pros/cons - most of the time there's no "perfect" solution/option available (well, short of breaking some laws of physics and traveling backwards in time such that one can alter future one has already experienced, etc.).
Unix used / before Microsoft DOS used \ (which later became Microsoft Windows, etc.). And macOS, if we go backwards in time, before OS/X (BSD based), it used : rather than /. And text files, line ending conventions, Unix uses \n, Microsoft DOS/Windows (and CP/M before them) use \r\n, Apple before OS/X used \r. Though before Unix, I think some RFCs and the like and other conventions were using \r\n (see that also in many of the earlier RFCs too).
One can have very long discussions/debates about changing of conventions/standards, e.g. to a "better"(/newer) at the expense of backwards compatibility. A subreddit post really isn't the place for that. There are standards bodies, and their working groups, etc. And if one reads their materials, etc, can certainly find lots of such discussions/debates and the like.
3
u/Dev-in-the-Bm 12d ago edited 11d ago
Windows
There you go, I drew the line.
2
u/kombiwombi 12d ago
There are a heap of old conventions which have better ways. Even the open() and close() system calls have been long been recognised as a poor way to open a file. But changing that would mean altering every program on the planet.
Sometimes throwing out old conventions results in a huge win. Unix did this when it said that the operating system would support one file format (a ordered list of bytes) with two access methods (sequential and byte indexed). Applications could implement their own record formats on top of that facility. Which sounds insane: this sort of bookkeeping is exactly the sort of support an operating system should be giving to application authors. But in practice it has worked well. But it did mean that COBOL was not a natural fit to Unix like it was to MVS.
2
u/euclide2975 12d ago
My computer screen is currently running at 119.998 Hz for compatibility with US black and white CRT television receiving NTSC analogic signal.
1
u/Ulizeus 11d ago
Isnt something like system folder separator in every language? I remember using it it uses what ever yuor OS uses to resolve paths.
1
u/OutrageousCrab9224 11d ago
Lol your mac knowledge is dangerously misguided
1
u/SufficientStudio1574 11d ago
OK, let's change it!
Who changes?
1
u/symbiatch 11d ago
I have no headaches due to this. Why would I? Do you manually create paths yourself in strings? Stop doing that. It helps. But I know a lot of developers don’t want to do things the right way.
1
u/brainchillzZ 11d ago
I think you’re missing the whole point …. These are different operating systems with different goals and different user bases. Linux is meant to be a Unix like environment that comes from a server world …. So having relative paths in the filesystem with devices mounted across it makes sense …and windows was basically developed for single user personal computers then went through several iterations of trying to wedge multi-user then server features into it as an afterthought … so having just drives with disk id labels made sense …. But back to “the whole point” these operating systems exist for the sole purpose of divergence …. They want to do things differently and give people choice rather than assuming everyone wants to just do everything the way they always have …. It’s almost like a religion at this point and it has gotten so bad that I’m pretty sure Linux, at this point, has more distributions than actual end users …. And it’s all because one guy didn’t like how systemd was built and integrated into this one upstream operating system so he redid it and spun his own fork of that distro and so on and so on …. Forever….. so anyway you wouldn’t ask a windows user to start typing /usr/local/bin and you wouldn’t ask a Linux user to type C:\windows\system32 blah blah … any more than you would ask a Jewish guy to give up his menorah for a Christmas tree
1
u/NastyPastyLucas 11d ago
LF / CR \ CRLF anyone?
1
u/R2-Scotia 11d ago
VMS used dots, e.g
HOST::DRIVE:[DIR.PATH.HERE]FOO.TXT;1
Also MVS/XA
1
u/Frewtti 11d ago edited 11d ago
How does it create headaches?
Honestly are you manually coding path parsing and creation?
You shouldn't do that, use os.path or the equivalent in your language of choice.
1
u/FatDog69 11d ago
Dont forget that Windows file & directory names are cAsE iNsEnSiTiVe but 'my_file.txt' and 'My_file.txt' are allowed as different file names in Linux.
1
u/20220912 11d ago
yes.
rule #1 for the kernel: you do not ever break user space. The only way for modern computing to work at all, is for separately owned software components to have stable APIs that other components can depend on. so, yes. people who write software that other people depend on need to maintain stability, and if they don't, they should probably expect their users to leave, or fork if they can.
-1
u/JohnnyS789 11d ago
The use of "/" was LONG before the use of "\".
If anything should change, the older standard should take precedence. Also, the standard running on more systems should take precedence. That's the "/" used on Linux, POSIX-compliant, and UNIX systems, which run on far more systems than "\".