Forget compiling; if (for example) you want to have a couple of meaty java projects open in an IDE plus an appserver plus a db tool you're way over 4Gb before doing any work. And then if you want to run the database as well, or say virtualbox, or use a browser...
Plus RAM is ridiculously cheap; I've just seen 24Gb for £100 plus VAT.