Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am a computer science student and I'm thinking of getting a new laptop. Is Macbook C++ programmer friendly? Does OSX have enough tools as in Linux for programming. Does working on a macbook hinter my growth as a C++ programmer.

EDIT: I mainly use gedit, gdb, g++, meld, ddd (gdb front end), valgrind etc in Ubuntu Does OSX have equivalent softwares.

share|improve this question

closed as off topic by Mark Trapp Sep 5 '11 at 16:44

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

You'll always be able to install Ubuntu in a Mac machine. And part of the point of programming in C++ is aiming to multiple platforms so I'd totally go for that Macbook. –  vemv Sep 5 '11 at 9:24
The tools are available to do C++ programming, but the environment is different. It won't be like switching from Ubuntu to Fedora. It will be more like switching from Ubuntu to FreeBSD, since OSX userland is based on FreeBSD. OSX kernel is completly different from both Linux & FreeBSD. Doing C++ development won't hinder your growth as a C++ developer, but it will hinder your growth as a Linux C++ developer. You just need to determine how platform specific you want to get. –  Joe Internet Sep 5 '11 at 13:38
Hi iJeeves, helping you buy a computer isn't on-topic here. A related question is Why do programmers use or recommend Mac OS X?, which explains why people do recommend Macs for programming. –  user8 Sep 5 '11 at 16:45

3 Answers 3

Yes, you can do everything on the Mac OS X that you can do on a *nix system. So no, it will not hinder your progress as a C++ programmer. If anything, it'll make your laptop experience more enjoyable. (As an off-topic aside, I find the keyboard much easier to navigate and send things flying in vim.)

Also note: The programs you have listed are not specific to Ubuntu.

Even though this question was closed as off-topic, it contains popular rationale for programmers favouring Mac OS X.

share|improve this answer

I've been using some flavour of OS X to do C++ development for about 5 years and I've never struggled with it. There's plenty of equivalent programs for when the same tools haven't been ported directly, but most of the Unix tools you're familiar with should be there for you.

share|improve this answer
  • As far as native C++ IDEs go, on OSX for free you have XCode 3 which comes with most of the tools you need. But it's Apple, so expect tools like GCC, GDB etc. will be outdated. For example I had OSX 10.6, which came with GCC 4.2, at the same time on Linux I had GCC 4.5. OSX 10.7 "Lion", which was released half a year after the Linux I'm using, only has GCC 4.4. Also the GCC and other tools are "tweaked" by Apple, resulting in some unexpected behavior (like for example in OSX 10.6 the GCC's -march=native would give an error).

  • Absolutely must have tool for C/C++ programming is Valgrind. Only recently it supports OSX at all, and it's not very mature yet. And it seems that it's not even possible to build it from MacPorts on Lion yet. Valgrind team is working on it, but obviously it's not their highest priority.

  • Most of open-source is available for OSX from MacPorts (or Homebrew). These usually don't have latest versions, and have only source packages, which need to be compiled every time. This is time consuming and error prone. Something that on Linux is 10 second apt-get install, on OSX may mean few hours of compiling. If you're lucky enough. See previous point for example of what can go wrong.

  • On OSX you'll get cross-platform tools like Eclipse CDT, however keep in mind, that Java (thus Eclipse etc.) is significantly slower on OSX than on Linux. This is due Linux dominating server market, thus optimizing JVMs on Linux is important for business. On the other hand in Apple's world Java isn't very much liked.

  • It can be argued whether OSX is niche on general market, however there is no arguing that it is niche in case of open source users/developers. Problems that will be solved instantly for Linux versions of software will take weeks for OSX version.

share|improve this answer
I've removed your reference about having to pay for Xcode. It's available for free on the Mac App Store in Lion. You have to pay if you want to generate app for the Mac/iOS App Stores. Well, it's on the review queue anyway. –  Loïc Wolff Sep 5 '11 at 15:04
Note that Apple has been moving to LLVM/clang for a couple of years now, which is why you don't see newer versions of gcc in Xcode. gcc 4.0 and 4.2 are only still maintained for legacy projects. –  Paul R Sep 5 '11 at 16:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.