I don't even think I've ever even seen my work MacBook using under 8GB of RAM and I'm fairly RAM efficient in my workflow. You'd start Docker on that thing and half your RAM is gone already, add VSCode and Chrome and everything is trashing already.
For the average user? Yeah, compression and swap is probably good enough. For professional use? Hell no.