What is an example in which knowing C will make me write better code in any other language?

前端 未结 20 1157
独厮守ぢ
独厮守ぢ 2021-02-05 12:40

In the Stack Overflow podcasts, Joel Spolsky constantly harps on Jeff Atwood about Jeff not knowing how to write code in C. His statement is that \"knowing C helps you write bet

20条回答
  •  囚心锁ツ
    2021-02-05 13:13

    Knowing C is really not worth much. Many of us who know C deeply like to think that all that deep insight is valuable and important.

    Some of us who know C can't think of a single specific feature of C that's helpful to know about.

    Knowing how pointers work in C (especially with C's syntax) isn't all that helpful. In a high-level language your statements create objects and manage their interaction. Pointers and references are -- perhaps -- interesting from a hypothetical point of view. But the knowledge has no practical impact on how you use Java or Python.

    The higher-level languages are the way they are. Knowing how doesn't change those languages; it doesn't change how you use them, debug or test them.

    Knowing how to create or manipulate a linked list has no earthly impact on Python list class definition. None.

    Knowing the difference between Linked List and Array List might help you write a Java program. But the C implementation doesn't help you choose between Linked List and Array List. The decision is independent of knowing C.

    A bad algorithm is bad in every language. Knowing inner mysteries of C doesn't make a bad algorithm any less bad. Knowing C doesn't help you know the Java collections or the Python built-in types.

    I can't see any value in learning C. Learning Fortran is just as valuable.

提交回复
热议问题