Question:
Why do I keep getting the impression that C++ really blows?
W B
2009-05-26 18:16:20 UTC
and the only reason why anyone uses it is because everybody else does.
its the first and only language i've used other than basic.
Despite my limited understanding I sometimes get the feeling that it has a lot of limitations and flaws.

What are some alternatives that others on here like in terms of ease & utility?
Seven answers:
Doc
2009-05-26 18:31:44 UTC
Because it does!



"When I created object-oriented programming, C++ is not what I had in mind." -- Alan Kay



"C++ is an atrocity, the bletcherous scab of the computing world, responsible for more buffer overflows, more security breaches, more blue screens of death, more mysterious failures than any other computer language in the history of the planet Earth.

— Eric Lee Green



"Within C++, there is a much smaller and cleaner language struggling to get out." -- Bjarne Stroustrup



"Historically, languages designed for other people to use have been bad: Cobol, PL/I, Pascal, Ada, C++. The good languages have been those that were designed for their own creators: C, Perl, Smalltalk, Lisp.

— Paul Graham



"If C++ has taught me one thing, it’s this: Just because the system is consistent doesn’t mean it’s not the work of Satan." — Andrew Plotkin



"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg". — Bjarne Stroustrup



"If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one?" — Tom Cargill



"In My Egotistical Opinion, most people’s C programs should be indented six feet downward and covered with dirt." — Blair P. Houghton
madmik3
2009-05-27 02:25:18 UTC
i think you complaint is related to the framework and not the language. really a language is a fairly simple thing. if you are looking for ease and utility try c# and the .NET framework, or python.



as a life lesson, if you don't understand something it's not safe to assume it's bad. in fact it's better to assume that if you don't like something you just don't understand it. the people that have come before you that have thought up this stuff put a lot of time into it. If it won't work the way you are thinking about it, maybe you are thinking about it wrong.
Ratchetr
2009-05-27 01:54:34 UTC
W B,



I basically agree with Scott.



C++ is very powerful, but it's hardly elegant. A few hard problems end up being easy in C++. A lot of simple problems end up being a pain in the **s in C++. If you don't need the low level power of C++, then it's probably the wrong choice.



Just for comparison sake: I posted some C++ code for you a little while ago. Here's the same code in C#. Same results, fewer lines of code. More intuitive (except maybe that => thing ;-)



public static int DoThing(int x, int y, Func op)

{

return op(x, y);

}



static void Main(string[] args)

{

Console.WriteLine(DoThing(5, 2, (x,y) => x+y)); // Prints 7

Console.WriteLine(DoThing(5, 2, (x,y) => x*y)); // Prints 10

}
Robin T
2009-05-27 01:33:10 UTC
There's no one language that is best for all situation. C++ may be good for a lot of low level programming, Java may be good for its platform independent nature, PHP may be good for its simplicity for web programming, etc. So first identify your need, then find the most suitable language for it. If you are still studying then learn a few different ones and understand their pros and cons.
?
2009-05-27 01:25:35 UTC
That's only because you suck at it.



C++ is a low level programming language (with help of inline-assembly), it has virtually no limitations. Your knowledge is the only limitation here.



Learn Python or Java or Ruby. They are a lot easier than C++.
2009-05-27 01:23:48 UTC
C++ is actually a very powerful and useful language. It is often harder for novice programmers to begin with C++. C++ in my opinion is a lower level - high level programming language. If your looking for ease and something easier to get started in I would ask you to consider VB.NET. Perhaps even get your feet wet with JAVA.
2009-05-27 01:32:18 UTC
C++ is one of the most powerful languages available to date. Keep studying it.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...