It's true that if the OS could predict exactly which memory pages to keep and which to swap out, we could save memory wastage, but so far I haven't seen any memory management scheme that can reduce memory consumption by half.
For me personally, I won't even consider a machine with less than 32GB ram in 2020/2021. With 32GB, I never close out of applications that I use regularly, and so it allows me to switch state instantaneously for not that much more money. My workloads are typically read-heavy & multiple GBs - editing/screening/cataloging hundreds of RAW photos, loading of multi-GB games, having about 50 tabs open in FF, etc. After having switched careers I rarely code anymore, and I don't think these are uncommon requirements.