A skeptic's history of C++

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

A skeptic's history of C++

#1 Post by Flash »

http://blogs.techrepublic.com.com/progr ... ag=nl.e055

[quote]... What are probably the best criticisms of C++ have both been attributed to Stroustrup himself. The first is his statement that C makes it easy to shoot yourself in the foot, and C++ makes it harder — but when you shoot yourself in the foot with C++, you typically blow off your whole leg. The second is an interview for IEEE Computer Magazine that was supposedly shelved because it was decided it could not be published, in which he “admits

User avatar
jyore
Posts: 43
Joined: Sat 06 Nov 2010, 15:41

#2 Post by jyore »

lolz...that is good

c++ really is a joke :P

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#3 Post by Sit Heel Speak »

:lol: *whew* good thing Mr. Stroustrup has spared us the even funnier version...

Much the same goes for the evolution of xBase, using which all U.S. Federal income tax returns have been processed ever since the Clipper era of the mid-'80's. No doubt, somewhere in Ogden, Utah, or perhaps Philadelphia, there is a contract-programmer who could write much the same interview and then Jesse Ventura, if he is really fearless, would have grist....

User avatar
droope
Posts: 801
Joined: Fri 01 Aug 2008, 00:17
Location: Uruguay, Mercedes

#4 Post by droope »

Wha? :(

*ignorant mode on*

and what should we code our crazily complex low level stuff in? I thought c++ was the real deal
What seems hard is actually easy, while what looks like impossible is in fact hard.

“Hard things take time to do. Impossible things take a little longer.â€￾ –Percy Cerutty

[url=http://droope.wordpress.com/]Mi blog[/url] (Spanish)

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#5 Post by Pizzasgood »

Nah, C is the "real deal". C++ is sort of a higher-level (that is, more abstract) version of C, arguably on crack. In many ways it is a nicer language, but it can potentially get very ugly if you don't know what you're doing, and even if you do. There are a lot of "weird" things you can do with it and a lot of ways to make things more complex than you ever wanted them to be.

C on the other hand is a very simple and predictable, if sometimes cumbersome, language. Not only is it easier to learn and write, but it's also easier to implement. So it's a pretty omnipresent language.

My own preference is for C++, at least for writing my own code. When it comes to working with other people's code I prefer C, because I know C much better than I know C++, so it's easier to figure out what they were trying to do. Though, a lot depends on the program and the programming style that was used. It's certainly possible for C++ to be a lot clearer than C if used right. But it can be harder to track down odd little bugs and nuances since it leaves more possibilities open than C does.


If you want to get very low-level though, you'd use an assembly language. Those are as low-level as it gets, short of writing things out as pure numbers. But different architectures (e.g PowerPC vs. x86 vs. ARM) have slightly different assembly languages, and assembly is usually even more cumbersome to work with than C, so it tends not to be used much in the PC world anymore. It's still pretty important in the embedded world, though they're making more and more use of C and even Java nowadays.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
droope
Posts: 801
Joined: Fri 01 Aug 2008, 00:17
Location: Uruguay, Mercedes

#6 Post by droope »

Hi Pizzas!

Thank you for your answer, I think I understand much more now.
Pizzasgood wrote:Nah, C is the "real deal". C++ is sort of a higher-level (that is, more abstract) version of C, arguably on crack. In many ways it is a nicer language, but it can potentially get very ugly if you don't know what you're doing, and even if you do. There are a lot of "weird" things you can do with it and a lot of ways to make things more complex than you ever wanted them to be.
Aah, I get it. Kinda like PHP?
C on the other hand is a very simple and predictable, if sometimes cumbersome, language. Not only is it easier to learn and write, but it's also easier to implement. So it's a pretty omnipresent language.

My own preference is for C++, at least for writing my own code. When it comes to working with other people's code I prefer C, because I know C much better than I know C++, so it's easier to figure out what they were trying to do. Though, a lot depends on the program and the programming style that was used. It's certainly possible for C++ to be a lot clearer than C if used right. But it can be harder to track down odd little bugs and nuances since it leaves more possibilities open than C does.
Hmm, so despite everything, you'd stay with C++?
If you want to get very low-level though, you'd use an assembly language. Those are as low-level as it gets, short of writing things out as pure numbers. But different architectures (e.g PowerPC vs. x86 vs. ARM) have slightly different assembly languages, and assembly is usually even more cumbersome to work with than C, so it tends not to be used much in the PC world anymore. It's still pretty important in the embedded world, though they're making more and more use of C and even Java nowadays.
Look, i've found a hello world tutorial for assembly. What do you mean with embedded world?

Thanks!
What seems hard is actually easy, while what looks like impossible is in fact hard.

“Hard things take time to do. Impossible things take a little longer.â€￾ –Percy Cerutty

[url=http://droope.wordpress.com/]Mi blog[/url] (Spanish)

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#7 Post by Pizzasgood »

Embedded refers to the chips in things like microwaves, cars, portable electronics, etc. Which have a very wide range of capabilities nowadays. For example, a cell phone vs. a cheap digital thermostat.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

Post Reply