0

What could some of you recommend for using when learning C and programming with C?

I have thought of the following options. (On OSX)

  1. Aquamacs
  2. TextMate and the Terminal
  3. XCode

I want to learn more than just the IDE so that I grasp the concept as I will be learning about compilers etc.

I tried Aquamacs when learning Erlang but it was more of a hassle than I enjoyed.

Is there a lot extra to learn when using an Emacs environment?

What is most beneficial for understanding how things work. ( C )

Are there any other tools or possible options worth looking into?

Thanks

some_id
  • 29,466
  • 62
  • 182
  • 304
  • Unfortunately, you'll never find a rational discussion of the merits and deficiencies of those platforms on the internet. – nmichaels Jan 21 '11 at 13:27

5 Answers5

5

If what you want to learn is C Programming Language in Mac OS X I would go with XCode. It has a very good GDB integration, and its learning curve is smoother that EMACS' or just writing your own Makefiles.

Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
3

If you want to learn about C, in my opinion, you should use the most basic editor available, compile using the terminal with gcc. And that's it.

Once you'll understand the language, picking one IDE over an other will be a no brainer.

But no IDE will really teach you anything about C.

Xavier T.
  • 40,509
  • 10
  • 68
  • 97
1

There's also BBEdit on OSX. (I've used it briefly in the OS8 days.) As far as learning C goes, there are a number of books that you can try. I'd pop down to whatever chain bookstore is closest and browse the Programming section.

I'd also invest in a good algorithm book.

buzzwang
  • 336
  • 3
  • 3
  • I have C books and have studied algorithms. Just wondered about the editor and what is used in the industry. – some_id Jan 21 '11 at 13:38
  • 2
    I've been in the "industry" for 18 years now and I can tell you that it will be different from company to company. The best thing you can do is to learn the internals of C and understand how it works by simply using an editor and a terminal. Then you can add any kind of IDE or helper on top. The IDE is designed to make working with the low-level tools easier, but you'll still understand how things work when the IDE has a glitch or you are working in an environment where you are deprived of the IDE. – buzzwang Jan 21 '11 at 13:47
0

If you're not comfortable using a more advanced editor like vim or emacs, then I would suggest using TextMate or something similar. This would let you concentrate on the code you're writing rather than struggling to learn how to use the editor.

Using a full blown IDE like XCode will also allow you to pretty much ignore the build system while you're still learning the language itself. Once you get comfortable with C, learning things like make or cmake would be less overwhelming.

Then after that, maybe you can go back to check out vim or emacs and see what a more complex editor can do for you, if anything.

nawfal
  • 70,104
  • 56
  • 326
  • 368
jonescb
  • 22,013
  • 7
  • 46
  • 42
  • Thanks. I wouldnt say not comfortable. I want to learn how to use emacs, but wonder if learning it could slow down my C programming to the point where it isnt beneficial. – some_id Jan 21 '11 at 13:33
0

If you want to use Emacs as an IDE, you will need to write Makefile in order to be able to compile from within Emacs. Writing Makefile could help you understand the compiler options, object code, linking and such.

So to use Emacs as IDE for learning C, you should be using C-mode, know about M-x compile and using gdb under Emacs(M-x gdb). To look up man pages for library functions, M-x man and supply it (3 printf, for example to read the man page of C I/O function printf) the section number and function name.

I am not sure if using Emacs+Makefile this way is most beneficial in helping you teach how to compile, link, build etc, but it sure does help in learning those ideas.

vpit3833
  • 7,817
  • 2
  • 25
  • 25