返回正常中文阅读

想对这篇译文“指手画脚”吗?

您的参与将有助于译者提高译文的质量;同时,大家一起对问题的讨论也是最佳的学习方式。还等什么?请现在就注册登录译言,开始眉批!
大错 小错 不顺 建议

Five more reasons why every programmer should learn C

  1. C is not an object oriented language. Because of this, anyonewho learns C has to learn to think functionally. When you do learnobject oriented programming, you will have the base of C functionalprogramming to go by. This will make learning object orientedprogramming easier and more enjoyable.

  2. Writing programs in C is like a mental exercise. You must takecare of everything that many other languages take care of for you. Youmust manage your pointers, your memory allocation, and your memorydeallocation. You have to figure out how you will to handle strings,and dynamic data. In other languages, all these things are hidden fromyou. You don't know how they work, nor can you change how they work.You trade in control and speed, for ease of use. In many cases, this isa valuable tradeoff. In other cases it is not.

  3. For different situations you will use different languages. Somesituations will call for Lisp, others for Java, and still others forC++. But your solid foundation will be C. You may not use it to programcertain projects, but it will assist your ability to skillfully programin other languages.

  4. Programs generated with C code are smaller and faster thenprograms generated from any other type of language besides Assembly.Why not learn Assembly then? Assembly is a beautiful language that canbe very useful to learn, but it is not as portable as C, and popularlanguages like Java are based on C syntax, not Assembly. You shouldstill learn Assembly at one point, but it will not prove as useful toyou as C will.

  5. If you ever want to write a video game engine or an operatingsystem you will need C. You can't use C#, Java, or Basic for these typeof programming tasks.

You can find out how to learn C, here.

为什么每个程序员都要学C语言的五个理由

  1. C语言不是面向对象语言。因为这一点,任何学习C语言的人必须学会用函数思考问题。当你真正的去学习一门面向对象语言时,就会有C语言的函数学习基础去对比。这会使学习面向对象编程更容易理解和更有乐趣。
  2. 用C编程就像进行智力体操。你要顾及到每一件事情,而这在很多其他语言中他会为你处理。你要管理指针,内存分配,和内存回收。你要明白如何处理串,还有动态数据。在其他语言中,所有这些对你来说是隐藏的。你不知道他们如何运行,更不用说改变他们的运行方式了。你得到了使用的便利,失却了对程序的控制和速度。很多情况下,这是笔值得的买卖。其他的情况下就不是这样了。
  3. 不同情况下你会使用不同的编程语言。某些情况下要求使用Lisp,其他的要Java,还有别的要C++。但是C是你坚实的基础。你可能不会使用它做一些项目,但是它会帮助提高你的能力,熟练的用其他语言编程。
  4. 除了汇编语言之外,C代码生成的程序比其他任何语言生成的程序来得更小和运行更快。那么为什么不学汇编语言呢?汇编是一门学了很有用的语言,但是它没有C那样的可移植性,并且其他流行的语言比如JAVA的语法是基于C的,而不是汇编。你仍然应该学汇编,但它并不会证明它会像学C那样有用。
  5. 如果你想要写一个视频游戏引擎或操作系统,你会需要C。你不能使用C#, Java, 或 Basic来完成这些编程任务。
如果你想知道如何学习C语言,这里


阅读
发现
翻译