You are not logged in.
Yes, for a while I was a proponent of the 'C++ is for noobs, it lets you do stupid stuff, etc.' theory. This morning, I had a major facepalm moment.
While C++ is often used by total idiots, that in and of itself does not make it a poor language. It fills a rather important niche: a [more or less] high-level language that can still easily be compiled to machine code. As long as you've got a solid foundation in C, C++ is a good choice — then you know how it works behind the scenes. Not that I'd use it for anything absolutely requiring high speed, such as kernel code.
Okay, so maybe that was obvious to the more enlightened of you, but hey — give a former Apple fanboy a chance.
Offline
but hey — give a former Apple fanboy a chance.
I know a couple good rehabilitation clinics?
Offline
If you don't use multiple inheritance or virtual functions (and a couple of other small things) you can compile a c++ program without any RTTI. It won't use _any_ more indirection than raw C at this point.
If you use structs with function pointers in C, that's more or less equivalient to using virtual functions in C++.
These features do _not_ cost a lot. And they should only be used when the usage enables you to improve on program design. And if the program design improves, then so does probably both memory usage and execution time.
Offline
IMHO is a language places artificial restrictions on the coder, you need a new language. That's why I like C/C++. No limits. It'll let you trap yourself in an infinite loop and catch ^C so you cant escape if you want.
Offline
Don't express your positive opinion of C++ over at suckless.org. C all the way in that place.
OTOH, there seems to be no risk of expressing anything over there today, since their listserv seems to be down...
Offline
Don't express your positive opinion of C++ over at suckless.org.
Who said anything about 'positive'?
My opinion has merely reset itself to 'huh'.
Hmm, punt's codebase might have been less messy if I'd used C++... Now there's a thought...
Last edited by Peasantoid (2009-09-11 01:50:24)
Offline
C++ doesn't suck. It's just overly complicated. It does have some neat features though. The only problem is when people feel the need to use as many of those features as they can. That over complicates code.
Offline
Doesn't that come down to the programmer rather than the language, in the end? The natural temptation to do something because you can.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Sure, it does. It's an underpowered, overcomplicated mess filled with pointless trivia to be memorized and busy work. Its slogan should be: "C++: at least you're not writing in C." And it doesn't even do that well, since you nearly are writing C at times.
Offline
Its slogan should be: "C++: at least you're not writing in C."
+1
Offline
I've always loved C++, even when it gives you headaches. Every once and a while you have those moments when you go, "Holy crap, that's cool". Not to mention I would have Qt's baby if it let me.
Offline
C++ doesn't suck. It's just overly complicated. It does have some neat features though. The only problem is when people feel the need to use as many of those features as they can. That over complicates code.
In other words: "There are no stupid programs, just stupid programmers"?
Offline
I shorten that to just "people are stupid".
Offline
Therefore, it follows that this whole thread is stupid
We're all jerks, that's my philosophy. You, me, this jerk...
Offline
People hate C++ o.O? Are they JAVA programmers by any chance?
IMHO one of the greatest programming languages in existence. I like C as well but I do beleive programmers should use the right tool for the job and there are many cases where an object oriented approach is superior over procedual.... *gasp*.
The software required Windows XP or better, so I installed archlinux.
Offline
Tyriel, have you programmed something with GTK+ in C? You will see that it's rather object oriented, even though C isn't what people usually call an object oriented language. The language you're using don't dictate the paradigm, they just make a certain paradigm easier to follow.
(lambda ())
Offline
Sadly Andre, I have not coded anything in GTK+ as of yet. All my C and C++ experience was either a part of a larger system (Unix based) of for Windows based projects... evil I know but it paid the bills. Still you have me intrigued and I shall look into it as I have wanted to write something for about a year now but I am lacking the time.
Just an example of what I meant in the last post. I once wrote a package for connection pooling which in theory could be used for any application that needed a large number of simultaneous connections (primary intention was web applications). Now by using inheritance I was able to allow it to use just about any database you can think of my having an abstract class containing the available methods and the children classes used for a specific database by overriding the parent methods. Now it has been a while since I have done any significant C programming but this task imo would be more complex.
This all said there are times when I feel C is brilliant and I would rather use it. Once again I see it as the write tool for the job at hand.
The software required Windows XP or better, so I installed archlinux.
Offline
Sure, it does. It's an underpowered, overcomplicated mess filled with pointless trivia to be memorized and busy work. Its slogan should be: "C++: at least you're not writing in C." And it doesn't even do that well, since you nearly are writing C at times.
... enter the omnipresent negativity-spouting language bigot.
If you're going to make such claims, please provide examples so we can derive at least some informational value from your post.
I would have Qt's baby if it let me.
You... ew.
Last edited by Peasantoid (2009-09-12 00:01:37)
Offline
What?
C++ is a versatile language, which has many tools and paradigms that you can follow for any job. You can do procedural, if it's more efficient, or OOP if you have great gains in time management and low efficiency costs. How can you hate C++ when most of it is derived from C? Sure, you might hate it for writing kernal code, when it is important to be as efficient and low to the hardware as possible, but when you are making Video Games or managing network code, at least C++ lets you do both. With compilers getting more efficient, C++ code can run as fast as C most of the time.
If you are well versed in C and C++, then you might find that it is great to have the option of solving a problem many different ways.
Last edited by caelestis (2009-09-12 03:41:25)
Offline
caelestis: May I suggest that you clarify the intended recipient of your post?
If you were talking to me: I *don't* hate it [anymore]. It's a well-rounded language that manages to support two paradigms without seeming overly awkward.
Last edited by Peasantoid (2009-09-12 03:49:55)
Offline
pauldonnelly wrote:Sure, it does. It's an underpowered, overcomplicated mess filled with pointless trivia to be memorized and busy work. Its slogan should be: "C++: at least you're not writing in C." And it doesn't even do that well, since you nearly are writing C at times.
... enter the omnipresent negativity-spouting language bigot.
If you're going to make such claims, please provide examples so we can derive at least some informational value from your post.
Nah, this territory has been done to death. There's no need to rehash it at length here. I'm just providing some balance for this thread. It's not like we've seen any sterling arguments for C++ here either. Just a bit of "blame the programmer" and some "it's dangerous, so it must be powerful", tempered with some "C++ has moderately usable implementations of extremely common language features".
Offline
Semi-related.
The human being created civilization not because of willingness but of a need to be assimilated into higher orders of structure and meaning.
Offline
Peasantoid wrote:pauldonnelly wrote:Sure, it does. It's an underpowered, overcomplicated mess filled with pointless trivia to be memorized and busy work. Its slogan should be: "C++: at least you're not writing in C." And it doesn't even do that well, since you nearly are writing C at times.
... enter the omnipresent negativity-spouting language bigot.
If you're going to make such claims, please provide examples so we can derive at least some informational value from your post.Nah, this territory has been done to death. There's no need to rehash it at length here. I'm just providing some balance for this thread. It's not like we've seen any sterling arguments for C++ here either. Just a bit of "blame the programmer" and some "it's dangerous, so it must be powerful", tempered with some "C++ has moderately usable implementations of extremely common language features".
When you accidentally fill 400GB of space within 5 minutes of running your program, you learn not to worship C++, but rather treat it as a vengeful spirit. Respect it, but be very careful.
Offline
When you purposely parse 4 gigs of data across 8 files and send that across a socket to another machine for display as a 3D graph in less than a second you worship C++.
Granted I've never tried to do that in another language, but I've never seen a high level language faster than C++ when it's done correctly.
I'm sure someone will come back with benchmarks for some other language, but count this as my sterling argument for C++.
Edit: Added whitespace to avoid tl;dr
Last edited by scio (2009-09-13 14:16:26)
Offline
C++ users get Boost and the STL. That's pretty cool if you ask me. If anyone looks at the results of the Computer Language Benchmark Game, you'll find that C++ with Boost is pretty much crushing everything. I understand that those are submitted algorithms and could be bested, but it's pretty convincing.
Offline