Is C a wasted/useless language?
Is C really all that important now that there''s C++? The only programming experience I have is the past 4-5 months of programming C++ in my computer science class, but we''ve just gotten to structs and classes after covering arrays and file streams. The reason I ask is because today someone said that C is a waste of a language and that it is useless today, that we could do everything with classes and all game programming is done in C++. I''ve read in different places that game programmers usually write C-style code, as in, a more procedural style than an object-oriented, and that a procedural way of programming is faster than object oriented due to overhead (not too sure on that though). Is this also true? I''ve always wanted to be a game programmer and now that I''ve started taking the computer science class at my high school, I''m starting to like more and more programming (despite the fact we''re only doing dos programming with Turbo c++, but I guess we all gotta start somewhere). In my spare time I''ve started reading Tips of the Windows Game Programming Gurus, and although I''ve pretty much grasped some of the concepts up through chapter 5, I decided to buy The C Programming Language to help fill in some holes my computer science class doesnt cover (pointers/memory addressing, learning to use character arrays instead of AP class libraries). For all those who are light years ahead of me, do I seem to be heading the right way? I planned on learninng to program well in a procedural style rather than object-oriented, and use object-oriented when I felt time comes. Is there any words of advice you guys have?
I''m sorry for the long post, I''ve just been confused about the whole thing. One last question I have may seem trivial, but is DirectX based upon and use classes? I opened up a couple of the header files in notepad, ran a find on the word class but couldn''t find anything except for maybe something in the comments that were included or in the middle of a variable name.
Well thanks for reading my post, and thanks for any input that you all might have.
Mike
Never listen to people who say "such-and-such is wasted/useless/whatever". They tend not to know what they''re talking about. As at now, C is still an extremely valuable language, plus it won''t totally die until C++ is also dead, since C++ is a superset of C.
C is alive and kickin; how do you think we do (most) systems/embedded development?
As for DirectX, it''s a COM (Component Object Model) implementation. It''s a sort of class-based implementation, but in a more complex and more powerful (and OS-specific) sort of way. Don''t worry about how it''s implemented for now (COM gives a lot of people headaches, and some are reluctant to use DirectX for that reason), just worry about using it.
Welcome, and good luck!
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
C is alive and kickin; how do you think we do (most) systems/embedded development?
As for DirectX, it''s a COM (Component Object Model) implementation. It''s a sort of class-based implementation, but in a more complex and more powerful (and OS-specific) sort of way. Don''t worry about how it''s implemented for now (COM gives a lot of people headaches, and some are reluctant to use DirectX for that reason), just worry about using it.
Welcome, and good luck!
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
C++ is no longer a superset of the offical C standard (C99)
but it''s quite near, and well if you see it like this the C-Standard commitee are still alive and kicking, the new C++ stanrdad C++x00 i think it''s called is just around the corner trying to among other things keep up with C.
C won''t die, it''s a killer language it will prevail!
that said I love C++ but really they both have their pros and cons
but it''s quite near, and well if you see it like this the C-Standard commitee are still alive and kicking, the new C++ stanrdad C++x00 i think it''s called is just around the corner trying to among other things keep up with C.
C won''t die, it''s a killer language it will prevail!
that said I love C++ but really they both have their pros and cons
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats
DX is C based, so you won''t find anything that is C++:ish in those headers.
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats
January 28, 2002 06:13 PM
Well if we''re speaking in the broad term of programming C is definately not a wasted language, especially when dealing with embedded devices and doing lower level programming (if you dont want to specifically deal with asm). In terms of game programming i''m sure it still is used widely for commercial projects because OO style can still be implemented, however C++ is probably the widest used at this moment...
well thats my 2 cents.
well thats my 2 cents.
quote: Original post by DigitalDelusion
... the new C++ standard C++x00 ...
It's actually C++0x; you were close . I so hope that they include threading and some other higher level things in the new standard (like they said they might). As long as they're deviating from the C-roots of 'runs on everything' to 'runs on almost everything' they might as well make my job (actually: hobby ) easier.
[EDIT: Quote tag got broken, needed to fix it ]
Edited by - Null and Void on January 28, 2002 7:19:08 PM
if you learn c++ you pretty much know regular C. C is constantly used in emedded systems (aka low level engineering to control circuit boards and the like) Also I mainly use C++ for game development, because of the object oriented-ness of it. It helps me to think in more abstract and general terms so I can produce a better quality (gameplay) than others who use procedural. But then I also use C in developing libraries that are cross platform because a lot (and I mean a lot ) of people and companies still use C as their primary system.
But I''m confident that it will be come more clear to you as you learn more concepts and more programming. I sense your biggest fear is learning something that will waste your time: your not.
C is the best language (and C++) to base your computer science background on. After learning C(++) you''ll be able to learn any other language that comes and goes.
-Pac
"The thing I like about friends in my classes is that they can''t access my private members directly."
"When listening to some one tell about their problem (whether it''s code or not), don''t listen to what went right or wrong, but what they assumed....."
But I''m confident that it will be come more clear to you as you learn more concepts and more programming. I sense your biggest fear is learning something that will waste your time: your not.
C is the best language (and C++) to base your computer science background on. After learning C(++) you''ll be able to learn any other language that comes and goes.
-Pac
"The thing I like about friends in my classes is that they can''t access my private members directly."
"When listening to some one tell about their problem (whether it''s code or not), don''t listen to what went right or wrong, but what they assumed....."
-Pac "The thing I like about friends in my classes is that they can't access my private members directly." "When listening to some one tell about their problem (whether it's code or not), don't listen to what went right or wrong, but what they assumed....."
I really don''t see the point to keeping C.
C++ is like an upgrade of C (such a huge upgrade, that it has a new name)
If you don''t want to use classes and oop, then you can just write C code in C++, its exactly the same. Its like keeping VC++ v1.0 around when theres VC++ v6.0!
Sometimes, its useful to keep old versions around, but only when the updates exclude old features (such is the case in Direct X 8)
As for the functions, all the old C functions are also in C++, so if your accustomed to those, then you shouldn''t have a problem.
"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
C++ is like an upgrade of C (such a huge upgrade, that it has a new name)
If you don''t want to use classes and oop, then you can just write C code in C++, its exactly the same. Its like keeping VC++ v1.0 around when theres VC++ v6.0!
Sometimes, its useful to keep old versions around, but only when the updates exclude old features (such is the case in Direct X 8)
As for the functions, all the old C functions are also in C++, so if your accustomed to those, then you shouldn''t have a problem.
"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
"I've learned something today: It doesn't matter if you're white, or if you're black...the only color that really matters is green"-Peter Griffin
quote: Original post by matrix2113
I really don''t see the point to keeping C.
C++ is like an upgrade of C (such a huge upgrade, that it has a new name)
If you don''t want to use classes and oop, then you can just write C code in C++, its exactly the same. Its like keeping VC++ v1.0 around when theres VC++ v6.0!
Sorry, no cookie. C and C++ are different languages, as you''ll quickly learn if you try to compile certain legal C code in C++, and vice versa. They may have started out with C++ as a strict superset of C, but that''s changed as both languages evolved differently.
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement