c programing: using "struct" and "typedef struct"

Started by
10 comments, last by mertz 21 years, 6 months ago
I think it''s just a matter of programming style. Programmers have their own styles in naming classes, structs, vars, functions, etc. Hungarian Notation is one of them and used by Windows. _s and _t is probably just another style. If I were you, I''d just pick my own comfortable style and ignore those _s and _t. They are just names anyway.

One reason I can see is so that the type of one identifier can be distinguished from others. If you have:

coord x1;

What is it? a variable? a struct? a class? In order to know it, you have to look at the definition, and if your code is 100,000 lines with 100 files long, [:D] good luck. Without the help of a good IDE, that takes years.

My compiler generates one error message: "does not compile."
My compiler generates one error message: "does not compile."
Advertisement
dMDI what you are saying i hear, but it it also adventageous to echo the strokes of the master painters, before you in turn learn mastery and make your own marsterpiece. I think that learning from someone who has mastery is very important. You dont learn in a void, and you cannot learn everything from theory alone, which is what a book, or tutorial is. At some stage you need to look at those who went before you, before you progress forwards. So in short: id like to understand the coding pracrtices of Carmack, and Hargrove, and others, so that I can comprehend them, and from that comprehension grow my own problem-solving skills.
If it can be remediedWhy be unhappy about that?If it cannot be remediedWhat is the use of being unhappy about that?It's time to put a stop to this procrastination, later. Do, or do not; there is no try.

This topic is closed to new replies.

Advertisement