To answer Ricket: Xcode 4 doesn't support a few things (yet) like Plugins and some features (like assembly code) are non existent in Xcode4 (perhaps yet or never) so if you rely on some things you might want to keep a copy of Xcode 3 around.

If you want to take a look at a good Xcode 4 review (and see some of the key benefits/drawbacks) have a look at this.

That certainly is not what happened when I installed Xcode 4 the other day. It completely removed Xcode 3. Maybe the behaviour has changed in a later version.
–
andynormancxJul 3 '11 at 20:31

1

@andy that'd be strange, but I cannot confirm nor deny it at this point because I already have both. I'm sure there was an option to avoid that and replace it, but I installed this a few months ago and I don't remember now.
–
Martín MarconciniJul 4 '11 at 8:35

By default, Xcode 4 installs in the folder /Developer - but if you wish to install it in a different folder, allowing it to co-exist with previous Xcode 3.2 installations, you can change this location. You do this by selecting "Custom Install"

Just installed Xcode 4 (iOS 5 beta) following Wayfaring Stranger's pointer to change the destination of Essentials (default is Developer folder, which would have probably uninstalled Xcode 3).

However, note that installation vis-a-vis commandline tools was not so smooth. So far I noticed:

xed disappeared from the PATH (and the new Xcode didn't get added, either). My scripts/aliases stopped working until I fixed the issue. You might want to make sure your PATH is set up right after the install.

XcodeBuild (and probably other commandline tools) was replaced with the new one in /usr/bin, so if you're building against an SDK that's not included in Xcode 4 (e.g., 4.2), you'll get build errors.

As far as the question of why one would want to install these side by side, there's another reason that hasn't been mentioned by others. If you have a team of even a few people and a ship date, you might not want to change your tooling until a later date. But, you might want to check out what's new. For example, I want to follow along with the WWDC sessions that discuss the new SDK/Xcode features.

Just got XCode 3 and 4 working together. First I installed XCode 4 and then decided I needed both. After installing XCode 3 to /Developer/XCode3 , then XCode 4 broke. I ran the XCode 4 installer again and now both work.