Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Is learning C really a must for a programmer?

Name: Anonymous 2012-09-02 6:17

Many have this opinion. Somehow, by doing manual memory management allocation and garbage mangement one would become a better programmer.

I have little experience in C mainly because I can write terser and more readable code in Racket or Haskell. However I'm willing to give C a try just to learn these lessons that everybody keeps talking.

But I have a sneaking suspicion that I already know most of what is there to know. Can you list some useful lessons that a typical high level code dweller would be oblivious of?

Name: Anonymous 2012-09-04 22:56

Let's say based on a decision, I may have an array of strings that has to hold either 10, 100, or 1000 strings.

Wouldn't it just make sense to dynamically allocate that memory? Or would you really have me believe that the best course of action is to allocate room for 1000 strings and only use 10 if needed.

The dynamic memory allocation functions return error values if they fail. So what excuse do you have to not use them, unless you're a moron who doesn't check?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List