But in part my point is that there's virtually no one who gets this correct either with Linux systems or macOS, which is what makes rants like the parent article so annoying.
The ones that don't are mainly lazy ports from Windows where that speration doesn't exist.
Temporary files often shouldn't exist. If it's less that a few megabytes why is it touching disk unless it will be needed persistently? In any case the detritus doesn't matter, if it's big enough to care I'll see the disk space is low and find it with baobab at some point.
It's not perfect, but it's not a major nightmare.
I dislike it when applications fail to remove all of their files on uninstall. Playing "find the orphans" is never fun.
I understand the reasoning here, but there should always at least be an option to clean everything on uninstall.
Xdg is also, .cache (xdg cache dir) for data that can be cleared on reboot allowing you to use tempfs for it (of course you can't because a bunch of shit uses it as a persistent cache for things they should be putting in .local/share/. (Xdg data dir).
This whole mess is so utterly fucked I gave up caring and just let the mess be.
Why? Using it makes macOS more similar to Linux, which I think is a good thing. It surely makes it easier to share configuration files between Macs and Linux machines.
Honestly, I don't see a single upside to using macOS's specific directories over .config/.cache/.local.
I'd prefer a multigigabyte download went in state or data dirs if you don't want to lose it regularly.
I also prefer XDG because it separates between XDG_DATA_HOME, XDG_STATE_HOME, and XDG_RUNTIME_DIR. The macOS convention does not.
I prefer `~/.config`, but it’s not where such configurations go on the Mac (and there are multiple applications that do it differently).
[1] https://specifications.freedesktop.org/basedir-spec/latest/ [2] https://wiki.gnome.org/action/show/Initiatives/GnomeGoals/XD...
User expectations differ. The correct place to put application detritus is `~/Library` on macOS (`/Library` if it’s system-level with no user-level). I am surprised when a cross-platform library uses `~/Library` instead of XDG, but I am not unhappy with it.
Frankly, most programs should have a command like `show-config-paths` (`--show-config-paths`) so that you can see where the configuration, caches, etc. are on the platform you’re on, and possibly be told (a) whether they are overridden from default and (b) how to override them. It would be useful to have that output for both human and machine reading.
Furthermore, when you do '--help', whenever it's half-way reasonable, I will show you what your currently resolved settings are for any flags/variables/configs next to the corresponding flag, as well as the default value. I actually don't know why this isn't common.
I’ve got a script that I’m making conform to XDG, and it's a lot of work to make it work well because I have to know about three different roots for different things (configuration, temporary files, and persistent files). I’m not convinced that it's worth it, because it is no longer as easy as telling someone "uninstall this by doing `rm -rf ~/.PROGRAM`", but instead I have to say `PROGRAM self destruct` or something like that to clean up all the detritus (and what if it fails in the middle?).