Follow TV Tropes

Following

Is C++ easy to understand

Go To

storyyeller More like giant cherries from Appleloosa Since: Jan, 2001 Relationship Status: RelationshipOutOfBoundsException: 1
More like giant cherries
#1: Jun 1st 2011 at 2:38:50 PM

I decided to create this thread to try to avoid derailing the car thread further. Certain people have said that C++ is easy to understand. On the other hand, other people have said that they still don't understand C++ fully, even after programming in it professionally for over a decade.

What do you think?

Blind Final Fantasy 6 Let's Play
Yej See ALL the stars! from <0,1i> Since: Mar, 2010
See ALL the stars!
#2: Jun 1st 2011 at 2:39:49 PM

Depending on the Writer. ...I know that trope means something totally different, but it does actually depend on the writer.

Da Rules excuse all the inaccuracy in the world. Listen to them, not me.
nzm1536 from Poland Since: May, 2011
#3: Jun 1st 2011 at 2:41:20 PM

C++ is relatively easy to understand because of its structure and syntax. Obviously, there are things that are difficult in it but if you compare it to, for example, Assembler, it's easy.

If the certain piece of code is easy to read depends on the way it's written though. If you write messily, don't leave commentaries etc., your code will be confusing

"Take your (...) hippy dream world, I'll take reality and earning my happiness with my own efforts" - Barkey
MilosStefanovic Decemberist from White City, Ruritania Since: Oct, 2010
Decemberist
#4: Jun 1st 2011 at 2:41:35 PM

You should definitely have previous experience with easier languages to start learning C++.

The sin of silence when they should protest makes cowards of men.
storyyeller More like giant cherries from Appleloosa Since: Jan, 2001 Relationship Status: RelationshipOutOfBoundsException: 1
More like giant cherries
#5: Jun 1st 2011 at 2:42:43 PM

It's easy to understand the basics, but near impossible to understand everything.

Fortunately, if you program in sensible ways, you only rarely run into the various pitfalls hidden in the language.

Blind Final Fantasy 6 Let's Play
blueharp Since: Dec, 1969
#6: Jun 1st 2011 at 2:43:48 PM

To understand, easy is C++, but mastering hardness it is.

Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#7: Jun 1st 2011 at 2:52:16 PM

I don't think that it's as easy as other similarly powerful languages. An.d apparently the binaries are hard to deal with too; the people behind D gave up on maintaining compatibility with them.

Why?

[1] This facsimile operated in part by synAC.
Medinoc Chaotic Greedy from France Since: Jan, 2001 Relationship Status: [TOP SECRET]
Chaotic Greedy
#8: Jun 1st 2011 at 3:03:20 PM

I'd say C++ becomes very hard to understand when programmers get a bit clever with templates. Okay, a container of objects of a given type is easy to understand. Some heavy "meta-programming", not so much.

"And as long as a sack of shit is not a good thing to be, chivalry will never die."
ChristopherAlgoo Red Oni from New York City Since: Jan, 2001
Red Oni
#9: Jun 1st 2011 at 3:04:48 PM

1. Have you programmed before?

2. What do you want to make with C++?

edited 1st Jun '11 3:04:56 PM by ChristopherAlgoo

Those who accept their fate find happiness; those who defy it, glory.
Fighteer Lost in Space from The Time Vortex (Time Abyss) Relationship Status: TV Tropes ruined my love life
Lost in Space
#10: Jun 1st 2011 at 3:11:49 PM

I struggled with OOP when I first started studying C++, from a C background. I guess it wasn't until I started working in Visual Basic that I really got the point of class-based instead of procedural programming, and part of the reason for that is that the VB editor (well, I should be clearer: the VBA editor) has a lot of tools to make working with class objects easier.

It wasn't constructors/destructors and public/private that got me snarled up so much as templates, virtual classes, and all the snarly rules of inheritance. Still, if I'd put in more time, I probably would have gotten more out of it. Just didn't seem important enough when I started.

"It's Occam's Shuriken! If the answer is elusive, never rule out ninjas!"
Linhasxoc Since: Jun, 2009 Relationship Status: With my statistically significant other
#11: Jun 1st 2011 at 3:13:42 PM

I suspect C++ is used largely because it was one of the first programming languages to use right. That said, a well-written (and well-commented) C++ program should be easy to understand, but it's easier to write a difficult-to-understand program in C++ than in, say, Python or even Java.

Personally, my main issue with C++ is actually that its syntax is kind of a mess. I've always thought C++ programs looked kind of ugly. (I program in Objective-C, though, so I shouldn't talk).

nzm1536 from Poland Since: May, 2011
#12: Jun 1st 2011 at 3:14:51 PM

Java isn't too good to be honest

"Take your (...) hippy dream world, I'll take reality and earning my happiness with my own efforts" - Barkey
storyyeller More like giant cherries from Appleloosa Since: Jan, 2001 Relationship Status: RelationshipOutOfBoundsException: 1
More like giant cherries
#13: Jun 1st 2011 at 3:15:35 PM

Java's a pain. I still don't understand how people get by without operator overloading.

edited 1st Jun '11 3:15:49 PM by storyyeller

Blind Final Fantasy 6 Let's Play
breadloaf Since: Oct, 2010
#14: Jun 1st 2011 at 3:17:47 PM

If you're talking about learning languages, C++ is a good place to start since you can basically do both procedural as well as OO programming. I tend to dislike learning Java before C++ because it is important to understand memory management. The difference between good programmers and bad programmers isn't usually experience but understanding memory. Don't get memory, you usually write crappy programs no matter if you have two decades of experience or six months of experience.

That being said, Java is an excellent second language to learn to more easily grasp OO, because you're forced to do OO.

Also, your mom likes VB.

edited 1st Jun '11 3:18:27 PM by breadloaf

nzm1536 from Poland Since: May, 2011
#15: Jun 1st 2011 at 3:27:24 PM

Java is slow and impractical. C++ might have its problems but at least it can create great software, from web browsers to video games

"Take your (...) hippy dream world, I'll take reality and earning my happiness with my own efforts" - Barkey
Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
Yej See ALL the stars! from <0,1i> Since: Mar, 2010
See ALL the stars!
#17: Jun 1st 2011 at 3:30:43 PM

Whereas C# is the best.wink

Also, breadloaf, memory's only really important in a few circumstances and IMO riding on a VM isn't one of them. So long as you don't keep too many objects in memory at once, you're fine.

edited 1st Jun '11 3:31:38 PM by Yej

Da Rules excuse all the inaccuracy in the world. Listen to them, not me.
Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#18: Jun 1st 2011 at 3:32:51 PM

C++ might have its problems but at least it can create great software, from web browsers to video games

Wait, what does that even mean? Java is widely used for all sorts of things.

[1] This facsimile operated in part by synAC.
storyyeller More like giant cherries from Appleloosa Since: Jan, 2001 Relationship Status: RelationshipOutOfBoundsException: 1
More like giant cherries
#19: Jun 1st 2011 at 3:40:47 PM

I see C# as being sort of like Java except designed to be somewhat less obnoxious and to cater more towards C++ programmers.

Though properties is a nice feature. Apparently you can do it in C++ as well with template metaprogramming (just like anything else), but it's not nearly as nice to do.

edited 1st Jun '11 3:41:38 PM by storyyeller

Blind Final Fantasy 6 Let's Play
blueharp Since: Dec, 1969
#20: Jun 1st 2011 at 3:41:30 PM

I program everything in Java Script, which must be a lot better than regular Java, just like cursive is better than block print.

TrapperZoid Since: Dec, 2009
#21: Jun 1st 2011 at 3:41:56 PM

C++ is the result of taking C and bolting a whole bunch of language extensions to it, and so it feels like the amphibious evolutionary link between C and the more modern OOP languages like Java, C# etc. It's a language where you can be a decent programmer and be able to work on the vast majority of C++ applications out there but still not understand fully how some of the more esoteric functionality works. For example, I don't think I've ever had to use multiple inheritance except when learning the thing.

I wouldn't recommend it as a first language though. For absolute beginners, you need to learn how to program, not the intricacies of a language. I'd recommend something like Python that you can pick up and play around with, learning how to break problems up into smaller chunks you can code. Then once you're comfortable with the idea of programming, you can learn another language.

storyyeller More like giant cherries from Appleloosa Since: Jan, 2001 Relationship Status: RelationshipOutOfBoundsException: 1
More like giant cherries
#22: Jun 1st 2011 at 3:42:10 PM

^^ They aren't even related. It's just deliberate naming confusion.

^ I've used multiple inheritance a couple of times. It's main use though is in the really fancy stuff that library writers do, so it's not something average programmers need to worry about much.

edited 1st Jun '11 3:43:38 PM by storyyeller

Blind Final Fantasy 6 Let's Play
breadloaf Since: Oct, 2010
#23: Jun 1st 2011 at 3:42:48 PM

Also, breadloaf, memory's only really important in a few circumstances and IMO riding on a VM isn't one of them. So long as you don't keep too many objects in memory at once, you're fine.

A) I shall bitch slap the next person to say memory is not important.

B) My point wasn't about memory, it was about code design. I find people who don't understand memory also don't know how to code well. They just code blindly. It's a sort of side effect thing.

Pykrete NOT THE BEES from Viridian Forest Since: Sep, 2009
NOT THE BEES
#24: Jun 1st 2011 at 3:43:34 PM

Java is nice from a conceptual understanding point and is beautifully easy to understand, but to get things to run at an appreciable speed you really need to not mask some of the background things that it hides from you.

C++ is easy to understand in itself, it's just difficult to proofread someone with a terrible sense of organization.

Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#25: Jun 1st 2011 at 3:44:49 PM

Why is memory important?

Why am I getting involved in an argument/catfight about which programming language is "best"?

[1] This facsimile operated in part by synAC.

Total posts: 205
Top