macports is pretty much dead simple to deal with. And if you want to install something straight from source on OS X it is often no more difficult as it is on linux. My servers are all debian and ubuntu and it's basically painless using them side by side with OS X all day. Plus, with OS X you can have most linux desktop apps + any OS X apps. Even so, OS X is definitely not necessary if someone spends all of his or her time in the shell, and if that's the case linux would be a better choice.
Things change. Hackers have been migrating to the Mac en masse. So MacPorts has gotten better and better.
Two or three years ago I went through the pain of installing Ruby/Rails, MySQL, Apache, and git from source -- that was the popular choice at the time, because MacPorts was just not up to date. But MacPorts now has current versions of ruby, mysql, git, and apache, so it's time to switch back.
Yeah, it's probably not as good as apt-get. On the other hand, on the Mac I have Mac software, which more than makes up for it. And if I'm ever nostalgic for apt-get a Linux virtual machine is not far away.
Nor are Macs. Every piece of software needs to be updated manually, as there is no system-wide update manager. If you want to install UNIX software (like C libraries that your language needs to bind to), you will need to install some sort of ports system, and maintain that. (When I used a Mac a few years ago, none of the ports systems all had the latest versions of packages I needed, so I had more than one installed. This was a fucking nightmare to maintain.)
Anyway, this (along with Apple's evil-ness) is what killed OS X for me. Yeah, it's really pretty, but it is too hard to maintain. Debian is much better. It is never missing anything I need, and full-system updates are just an apt-get away.
For programming, nothing beats a good UNIX system, as long as you are willing to learn how to use it properly.