If any one ask you about the weakness of C, what is your opinion.
Is it the code management ? or what?
If any one ask you about the weakness of C, what is your opinion.
Is it the code management ? or what?
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.
I am not 100% sure, others may know for sure, but I always thought it was speed.
-MethodMan-
Your Move:Life is a game, Play it; Life is a challenge, Meet it; Life is an opportunity, capture it.
Homepage: http://www.freewebs.com/andy_moog/home.html
Well plain C doesnt give you the advantage of object oriented programming, which hurts both project scalability and code reusability, so I'd say the main deficiency is the efficiency with which it can be programmed in.
lol, pendantic aren't we? Any nothing about my ending a sentence with a preposition?
Fine.
I'd say the greatest deficiency of C lies in the more limited capacity for scalable efficiency when programming in it.
I think C code is much more difficult to decipher than C++ code. What the heck is malloc and dealloc, etc? C++ is much simpler about that—New and delete.
My biggest gripe with C code is input and output. I keep seeing all of that printf, fprintf, scanf stuff along with the % operator which means you have to specify which type all of your variables are in order to output them. That's soooooo overly complicated. Cout and cin make much more sense. There's console output and console input. Their operators help to make the code even easier to read.
I really don't see why anyone would want to learn C when they could learn C++ just as well.
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.
C++ is a more complex language than C, it has the elements of C and a lot more. Also the object oriented paradigm is harder to understand for beginners than the procedural paradigm. C is a small language and quite easy to understand.
But the main disadvantage are the already mentioned elements code management, scalability and reusability. The advantages of object orientation are most visible in large scale software development. So the main weakness of C is that it doesn't support object orientation very well.
A weakness of C (and of C++ to a large extent) is that it forces you to think in terms of the machine too much. This is not always the most efficient (in terms of productivity) or elegant way to solve every problem. Or so they say.
Joe
I agree, I hate the syntax in C, it's easier in C++, although C++ is more complex...Originally posted by joshdick
I think C code is much more difficult to decipher than C++ code. What the heck is malloc and dealloc, etc? C++ is much simpler about that—New and delete.
My biggest gripe with C code is input and output. I keep seeing all of that printf, fprintf, scanf stuff along with the % operator which means you have to specify which type all of your variables are in order to output them. That's soooooo overly complicated. Cout and cin make much more sense. There's console output and console input. Their operators help to make the code even easier to read.
I really don't see why anyone would want to learn C when they could learn C++ just as well.
none...
>I hate the syntax in C, it's easier in C++, although C++ is more
>complex...
??
C++ has C's syntax and quite a lot more more language elements and constructions, like new operators, pointers to member functions, templates, ways of inheritance, abstract classes etc. A little demonstration of some new operator and constructions in C++:
To me, C++ has a more complex syntaxis than C.Code:void (Class:: *fp)() = &Class::print; ((new Class)->*fp)();
What, in your opinion, makes C++ easier than C? (I think you've used the wrong words in your post, I think you meant something different than syntaxis)
Last edited by Shiro; 01-01-2003 at 08:43 AM.
So, by showing an example of complex syntax in C++ you conclude that the C++ syntax is more complex than the C syntax?Originally posted by Shiro
A little demonstration of some new operator and constructions in C++:
Let me show some advanced C syntax:
http://www.es.ioccc.org/2000/anderson.c
I admit that the syntax of C++ can get a bit esoteric sometimes though, especially when dealing with templates.
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
No, you probably forgot to read the first lines of my post: "C++ has C's syntax quite a lot more more language elements and constructions,.. ". So C syntax is C++ syntax and I gave an example to show that with C++ the syntax hasn't become easier.So, by showing an example of complex syntax in C++ you conclude that the C++ syntax is more complex than the C syntax?
It is not the best teaching language to beginning programming students.
Mr. C: Author and Instructor
Its "incomplete type-safety" and the fact that it doesn't have templating or direct support of OOP.
So pretty much the weakness of C is that it's not C++