开发者

Recommended for learning C

开发者 https://www.devze.com 2023-02-06 13:07 出处:网络
What could some of you recommend for using when learning C and programming with C? I have thought of the following options. (On OSX)

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 unde开发者_StackOverflowrstanding how things work. ( C )

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

Thanks


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.


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.


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消