•      Sign In
• Create Account

Sponsor:

### #22hannesnisula  Members   -  Reputation: 1065

Like
0Likes
Like

Posted 16 August 2011 - 07:36 AM

No point in not continuing with C++ as it's a very powerful and straight-forward language.

LOL, anyone that calls C++ straight forward, doesn't know C++ that well.

I'm sorry you have trouble with C++ but that doesn't mean everyone have any trouble with it. I'm kind of curious about what's not straight forward, mind giving me some examples?

### #23Serapth  Crossbones+   -  Reputation: 6111

Like
1Likes
Like

Posted 16 August 2011 - 08:36 AM

No point in not continuing with C++ as it's a very powerful and straight-forward language.

LOL, anyone that calls C++ straight forward, doesn't know C++ that well.

I'm sorry you have trouble with C++ but that doesn't mean everyone have any trouble with it. I'm kind of curious about what's not straight forward, mind giving me some examples?

I don't have trouble with C++, it is simply not an intuitive nor clean language. All it takes is about 8 seconds looking at the STL libraries to see the inherit complexity in C++.

One easier way is to look at the language spec sizes. The initial language spec was 3 times the size of the C language spec and on top of that WAS a super set of C. This is completely ignoring the ongoing iterations of the language up to C++0x which is a horrifically byzantine language ( the working draft you can read here ).

Even among C++ developers, I do not think there is a good C++ developer alive that wouldn't in fact agree that the language is anything BUT straight forward.

Also, you do yourself a disservice assuming making assumptions about my ability with a language. Simply because something is complicated does not mean people can't master it. I learned the English language extremely well, but after encountering their/there/they're I don't think many people alive would call it a straight forward language.
My more Popular Tutorial Series:

### #24hannesnisula  Members   -  Reputation: 1065

Like
1Likes
Like

Posted 16 August 2011 - 10:37 AM

No point in not continuing with C++ as it's a very powerful and straight-forward language.

LOL, anyone that calls C++ straight forward, doesn't know C++ that well.

I'm sorry you have trouble with C++ but that doesn't mean everyone have any trouble with it. I'm kind of curious about what's not straight forward, mind giving me some examples?

I don't have trouble with C++, it is simply not an intuitive nor clean language. All it takes is about 8 seconds looking at the STL libraries to see the inherit complexity in C++.

One easier way is to look at the language spec sizes. The initial language spec was 3 times the size of the C language spec and on top of that WAS a super set of C. This is completely ignoring the ongoing iterations of the language up to C++0x which is a horrifically byzantine language ( the working draft you can read here ).

Even among C++ developers, I do not think there is a good C++ developer alive that wouldn't in fact agree that the language is anything BUT straight forward.

Also, you do yourself a disservice assuming making assumptions about my ability with a language. Simply because something is complicated does not mean people can't master it. I learned the English language extremely well, but after encountering their/there/they're I don't think many people alive would call it a straight forward language.

I never said you didn't master it, but you find it complicated. I don't, and I also find it very intuitive. The problem here is that you have decided the language is universally complex and unintuitive, though apparently not everyone agrees. Personally I think all managed languages are crap and I dislike them all, because of the fact that they're managed languages. Note that I'm not saying that everyone who likes them are bad programmers.

"Also, you do yourself a disservice assuming making assumptions about my ability with a language." Says the guy who just said I'm don't know C++ that well. You even assume people that say they find it intuitive are just liars, stupid or incompetent in C++. The irony is hilarious.

Good luck whatever language(s) you use and I'll go back to use the one I find easy to use (despite what you say).

### #25way2lazy2care  Members   -  Reputation: 782

Like
0Likes
Like

Posted 16 August 2011 - 10:58 AM

I never said you didn't master it, but you find it complicated. I don't, and I also find it very intuitive.

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?

### #26Serapth  Crossbones+   -  Reputation: 6111

Like
3Likes
Like

Posted 16 August 2011 - 12:19 PM

No point in not continuing with C++ as it's a very powerful and straight-forward language.

LOL, anyone that calls C++ straight forward, doesn't know C++ that well.

I'm sorry you have trouble with C++ but that doesn't mean everyone have any trouble with it. I'm kind of curious about what's not straight forward, mind giving me some examples?

I don't have trouble with C++, it is simply not an intuitive nor clean language. All it takes is about 8 seconds looking at the STL libraries to see the inherit complexity in C++.

One easier way is to look at the language spec sizes. The initial language spec was 3 times the size of the C language spec and on top of that WAS a super set of C. This is completely ignoring the ongoing iterations of the language up to C++0x which is a horrifically byzantine language ( the working draft you can read here ).

Even among C++ developers, I do not think there is a good C++ developer alive that wouldn't in fact agree that the language is anything BUT straight forward.

Also, you do yourself a disservice assuming making assumptions about my ability with a language. Simply because something is complicated does not mean people can't master it. I learned the English language extremely well, but after encountering their/there/they're I don't think many people alive would call it a straight forward language.

I never said you didn't master it, but you find it complicated. I don't, and I also find it very intuitive. The problem here is that you have decided the language is universally complex and unintuitive, though apparently not everyone agrees. Personally I think all managed languages are crap and I dislike them all, because of the fact that they're managed languages. Note that I'm not saying that everyone who likes them are bad programmers.

"Also, you do yourself a disservice assuming making assumptions about my ability with a language." Says the guy who just said I'm don't know C++ that well. You even assume people that say they find it intuitive are just liars, stupid or incompetent in C++. The irony is hilarious.

Good luck whatever language(s) you use and I'll go back to use the one I find easy to use (despite what you say).

I so love being paraphrased... incorrectly.

I never once said C++ users are bad programmers. I never once called you (nor anyone else) a liar, stupid or incompetent.

I did, and do, state that your comments regarding the complexity of C++ are wrong, especially given the forum in which you expressed them. One person's ease at intuiting a complex situation does not change the complexity. An idiot savant ( no... not insulting you ) can calculate high order mathematics problems, but that does not alter their overall complexity. I did however imply that good C++ programmers would agree that C++ is a complex language, especially when compared against other languages as this thread is.

Your outright dismissal of managed languages for their being managed is telling however.
My more Popular Tutorial Series:

### #27Telastyn  Crossbones+   -  Reputation: 3754

Like
1Likes
Like

Posted 16 August 2011 - 12:28 PM

We just had a good example the other day.

If you think C++ isn't complex, you've either been living under a rock (and can't compare its complexity relative to your alternatives), or haven't used it enough to discover all of the nuances, headaches, and undefined behavior inherent in the language design.

### #28hannesnisula  Members   -  Reputation: 1065

Like
1Likes
Like

Posted 16 August 2011 - 12:42 PM

No point in not continuing with C++ as it's a very powerful and straight-forward language.

LOL, anyone that calls C++ straight forward, doesn't know C++ that well.

I'm sorry you have trouble with C++ but that doesn't mean everyone have any trouble with it. I'm kind of curious about what's not straight forward, mind giving me some examples?

I don't have trouble with C++, it is simply not an intuitive nor clean language. All it takes is about 8 seconds looking at the STL libraries to see the inherit complexity in C++.

One easier way is to look at the language spec sizes. The initial language spec was 3 times the size of the C language spec and on top of that WAS a super set of C. This is completely ignoring the ongoing iterations of the language up to C++0x which is a horrifically byzantine language ( the working draft you can read here ).

Even among C++ developers, I do not think there is a good C++ developer alive that wouldn't in fact agree that the language is anything BUT straight forward.

Also, you do yourself a disservice assuming making assumptions about my ability with a language. Simply because something is complicated does not mean people can't master it. I learned the English language extremely well, but after encountering their/there/they're I don't think many people alive would call it a straight forward language.

I never said you didn't master it, but you find it complicated. I don't, and I also find it very intuitive. The problem here is that you have decided the language is universally complex and unintuitive, though apparently not everyone agrees. Personally I think all managed languages are crap and I dislike them all, because of the fact that they're managed languages. Note that I'm not saying that everyone who likes them are bad programmers.

"Also, you do yourself a disservice assuming making assumptions about my ability with a language." Says the guy who just said I'm don't know C++ that well. You even assume people that say they find it intuitive are just liars, stupid or incompetent in C++. The irony is hilarious.

Good luck whatever language(s) you use and I'll go back to use the one I find easy to use (despite what you say).

I so love being paraphrased... incorrectly.

I never once said C++ users are bad programmers. I never once called you (nor anyone else) a liar, stupid or incompetent.

I did, and do, state that your comments regarding the complexity of C++ are wrong, especially given the forum in which you expressed them. One person's ease at intuiting a complex situation does not change the complexity. An idiot savant ( no... not insulting you ) can calculate high order mathematics problems, but that does not alter their overall complexity. I did however imply that good C++ programmers would agree that C++ is a complex language, especially when compared against other languages as this thread is.

Your outright dismissal of managed languages for their being managed is telling however.

I give up. Trying to talk to someone who first states one thing, then denies it, is useless. By saying that every good C++ programmer would agree C++ isn't straight-forward, intuitive, complex etc also implies that anyone who says it is, is therefore not a good C++ programmer. I thought that was obvious but no problem, I just explained it.

Judging if something is complex or not is based on how you perceive it.

Also, my "outright dismissal of managed languages" is because there's little/no possibility to optimize performance by minimizing cache misses, depending on the exact situation. And instead of passing pointers around sometimes it's required to use for-loops and call functions to "cast" between different variable types.

### #29Serapth  Crossbones+   -  Reputation: 6111

Like
3Likes
Like

Posted 16 August 2011 - 01:23 PM

No point in not continuing with C++ as it's a very powerful and straight-forward language.

LOL, anyone that calls C++ straight forward, doesn't know C++ that well.

I'm sorry you have trouble with C++ but that doesn't mean everyone have any trouble with it. I'm kind of curious about what's not straight forward, mind giving me some examples?

I don't have trouble with C++, it is simply not an intuitive nor clean language. All it takes is about 8 seconds looking at the STL libraries to see the inherit complexity in C++.

One easier way is to look at the language spec sizes. The initial language spec was 3 times the size of the C language spec and on top of that WAS a super set of C. This is completely ignoring the ongoing iterations of the language up to C++0x which is a horrifically byzantine language ( the working draft you can read here ).

Even among C++ developers, I do not think there is a good C++ developer alive that wouldn't in fact agree that the language is anything BUT straight forward.

Also, you do yourself a disservice assuming making assumptions about my ability with a language. Simply because something is complicated does not mean people can't master it. I learned the English language extremely well, but after encountering their/there/they're I don't think many people alive would call it a straight forward language.

I never said you didn't master it, but you find it complicated. I don't, and I also find it very intuitive. The problem here is that you have decided the language is universally complex and unintuitive, though apparently not everyone agrees. Personally I think all managed languages are crap and I dislike them all, because of the fact that they're managed languages. Note that I'm not saying that everyone who likes them are bad programmers.

"Also, you do yourself a disservice assuming making assumptions about my ability with a language." Says the guy who just said I'm don't know C++ that well. You even assume people that say they find it intuitive are just liars, stupid or incompetent in C++. The irony is hilarious.

Good luck whatever language(s) you use and I'll go back to use the one I find easy to use (despite what you say).

I so love being paraphrased... incorrectly.

I never once said C++ users are bad programmers. I never once called you (nor anyone else) a liar, stupid or incompetent.

I did, and do, state that your comments regarding the complexity of C++ are wrong, especially given the forum in which you expressed them. One person's ease at intuiting a complex situation does not change the complexity. An idiot savant ( no... not insulting you ) can calculate high order mathematics problems, but that does not alter their overall complexity. I did however imply that good C++ programmers would agree that C++ is a complex language, especially when compared against other languages as this thread is.

Your outright dismissal of managed languages for their being managed is telling however.

I give up. Trying to talk to someone who first states one thing, then denies it, is useless. By saying that every good C++ programmer would agree C++ isn't straight-forward, intuitive, complex etc also implies that anyone who says it is, is therefore not a good C++ programmer. I thought that was obvious but no problem, I just explained it.

Judging if something is complex or not is based on how you perceive it.

Also, my "outright dismissal of managed languages" is because there's little/no possibility to optimize performance by minimizing cache misses, depending on the exact situation. And instead of passing pointers around sometimes it's required to use for-loops and call functions to "cast" between different variable types.

Sigh, reading comprehension is not your strong suit, is it? Everyone can see exactly what was said, so there is no reason whatsoever to paraphrase. However, we can look at exactly what I said:

"Even among C++ developers, I do not think there is a good C++ developer alive that wouldn't in fact agree that the language is anything BUT straight forward."

Emphasis was on good because there a a great many inexperienced, naive and yes, even bad C++ programmers and they posit all kinds of zany ideas. This I hold by. Every single programmer that I can think of whom I would consider "good" would not consider C++ to be a straight forward language, especially... and this part is extremely important... in a thread about various programming languages in a forum for beginners. Hell, I doubt even Bjarne Stroustrup would make the comment that C++ is straight forward when compared to many other languages. Hell, he himself has said the language is overly complex because it's need to support C. You do realize that the inherit complexity of C++ can easily be viewed as one of it's strengths, right?

"Judging if something is complex or not is based on how you perceive it."

When taken to a communal setting, no it isn't. A blind man born blind rightfully believes that white is black and is completely correct in his perceptions. Once he expands his reality beyond himself however, he becomes patently wrong. You are in a beginners forum, comparing against other languages and are making a comment as contextually wrong as the blind man saying "black is white".

And instead of passing pointers around sometimes it's required to use for-loops and call functions to "cast" between different variable types.

And not to get into a X vs Y language thread, but what exactly are you saying here? You do realize C# for example, has the ability to pass values by reference and has a function pointer system superior to C++'s, right? As to casting, again I am not really sure where the language difference is.. C++, Java, J# all support casting and require it to varying degrees. Unless you are comparing against duck types languages like Python?
My more Popular Tutorial Series:

### #30way2lazy2care  Members   -  Reputation: 782

Like
3Likes
Like

Posted 16 August 2011 - 01:25 PM

I give up. Trying to talk to someone who first states one thing, then denies it, is useless.

Where do you think he changed his stance? He seems fairly consistent.

Also, my "outright dismissal of managed languages" is because there's little/no possibility to optimize performance by minimizing cache misses, depending on the exact situation. And instead of passing pointers around sometimes it's required to use for-loops and call functions to "cast" between different variable types.

There are plenty of ways in C# at least to avoid many cache misses. There are some places they are unavoidable, but I'd very much consider the increased safety to outweigh those situations. At least to the point where the argument is not quite so trivial as saying managed languages are worse than C++. Optimizing by minimizing cache misses is very much a premature optimization, and there are some decent ways to shrink the risk with C#. Unless you have years of experience in C++ you will probably implement just as many cache misses as you avoid anyway.

### #31Mayple  Members   -  Reputation: 187

Like
1Likes
Like

Posted 16 August 2011 - 01:39 PM

I give up. Trying to talk to someone who first states one thing, then denies it, is useless.

Where do you think he changed his stance? He seems fairly consistent.

Also, my "outright dismissal of managed languages" is because there's little/no possibility to optimize performance by minimizing cache misses, depending on the exact situation. And instead of passing pointers around sometimes it's required to use for-loops and call functions to "cast" between different variable types.

There are plenty of ways in C# at least to avoid many cache misses. There are some places they are unavoidable, but I'd very much consider the increased safety to outweigh those situations. At least to the point where the argument is not quite so trivial as saying managed languages are worse than C++. Optimizing by minimizing cache misses is very much a premature optimization, and there are some decent ways to shrink the risk with C#. Unless you have years of experience in C++ you will probably implement just as many cache misses as you avoid anyway.

*qft* Let's not forget the fact that garbage collection has to be spot on since your making it from scratch.

-Mayple
I usually just give my 2 cents, but since most of the people I meet are stubborn I give a 1\$ so my advice isn't lost via exchange rate.

### #32laztrezort  Members   -  Reputation: 1031

Like
1Likes
Like

Posted 16 August 2011 - 01:39 PM

C++ is so complicated, that even arguing about C++ get convoluted

Discussions about cache misses and other such micro-optimizations are far beyond what a beginner needs to worry about when considering a language. I believe we are now we are entering the realm of "X is a faster/more powerful language than Y" territory that I alluded to earlier...

### #33A Brain in a Vat  Members   -  Reputation: 313

Like
1Likes
Like

Posted 16 August 2011 - 01:45 PM

It took me about 10 years of writing C++ code to understand that C++ sucks in a lot of ways. And "intuitive" is certainly not a word I'd use to describe lots of C++. Parts of C++ are "second nature" to me, but that's because I've gotten used to them. That's wholly different from "intuitive".

Useful: yes
Powerful: yes
Intuitive: no
For beginners: not most

### #34joshuanrobinson2002  Members   -  Reputation: 187

Like
0Likes
Like

Posted 16 August 2011 - 04:37 PM

Hey, ndrul.

If you're still stuck on deciding between C++ and C#, why not just give C# a shot and see if you like it.

You said you spent two months learning C++, so you've probably got a handle on basic programming principles such as flow control, conditional statements, and functions. C# and C++ also share a somewhat similar syntax, which might make picking up C# a little eaiser.

So, if this decision is a stopping point for you, why not just download C#, read up on it a bit, and spend a week (which is how long you said you've been working on your game in C++) working on a game in C# and see which one you like better, or feel more productive in.

I know that sometimes wondering if you're using the right language, or doing things "the right way" can put a halt on a project. And, I'm not trying to say that these things aren't important. But, you put a lot of emphasis on getting things done (productivity) in you're original post. If you're spending a lot of time worrying about choosing "the right language" you're not being very productive on your game .

### #35Sean_Seanston  Members   -  Reputation: 650

Like
0Likes
Like

Posted 16 August 2011 - 04:48 PM

I decided to start with C++, used SDL then decided to go into Direct3D.

TBQH... I do regret it now, because I think it did make things more complicated than they should've been, discouraged me when I hit brick walls which cost me a lot of time and made me have to deal with many new concepts at once instead of focusing on game logic etc.

Of course, I don't know how things would have been if I'd chosen Java or something instead... but from what it sounds like, Java game development is more forgiving and straightforward with libraries etc. (well it's clear even from my own experience that Java is a lot more... "helpful" than C++ for many things).

So... with the benefit of some experience... I would say to do what most people advise for beginners and start with Java or C# or something like that. C++ can be genuinely maddening when you don't know what's going on and you're struggling to make anything work in your very first games where you don't even really have a very clear idea of what kind of programming you need to use to accomplish what you've planned.

### #36Gamer Gamester  Members   -  Reputation: 136

Like
0Likes
Like

Posted 16 August 2011 - 05:34 PM

Judging if something is complex or not is based on how you perceive it.

Precisely. It is based on how complex it is relative to other things.

Compared to most other languages in common use, C++ is among the most complicated.

It's erroneous to argue that C++'s complexities don't count towards its complexity, simply because they are complexities which you stubbornly refuse to avoid (such as memory management), thereby promoting them to the status of "necessities".

Worrying about cache misses for a text-based rpg == unnecessary complexity.
I'd use Python or something similar.
The OP eventually wants to move up to more complicated games.
At that time he/she can switch to more complicated languages if and as necessary.
If you're serious about programming, you'll want to learn multiple languages anyways
(and if you're not serious about programming, it doesn't make sense to be making complicated games).

### #37Washu  Senior Moderators   -  Reputation: 6761

Like
1Likes
Like

Posted 16 August 2011 - 06:07 PM

Oh yay, yet another language war...

To the OP: Whatever makes you comfortable. In general most of the time we recommend starting with a simpler language and moving to harder ones. C++ is one of the hardest languages you can start with, and even after several years of programming in other languages you will STILL find it hard to pick up. C++ is not a trivial language, it has many many many corner cases, and they will all bite you in the ass at least once.

You really have a myriad of choices for software development, including game development. Not the least of which are C# (with XNA if you decide to write simple games or want to do some managed xbox work), Python with PyGame/PyGL, Java with Jogl (that's what Minecraft uses). All of those are WORKABLE solutions and are much simpler to pickup than C++, partly because their language standards lack the significant number of corner cases and undefined behaviors that crop up in the C++ standard.

For those who think C++ is easy, please feel free to provide some answers to the following very simple quiz:
This is a test of your knowledge of C++, not of your compiler's knowledge of C++. Using a compiler during this test will likely give you the wrong answers, or at least incomplete ones. Recently some people have been pestering me to post back up my C++ quizzes. So…without further ado here is the first one. The answers will be posted later.

1. Given the following three lines of code, answer these questions:
   int* p = new int[10];
int* j = p + 11;
int* k = p + 10;

A. Is the second line well defined behavior?
B. If the second line is well defined, where does the pointer point to?
C. What are some of the legal operations that can be performed on the third pointer?

2. What output should the following lines of code produce?
   int a = 10;
std::cout<<a<<a++<<--a;


3. Assuming the function called in the following block of code has no default parameters, and that no operators are overloaded, how many parameters does it take? Which objects are passed to it?
f((a, b, c), d, e, ((g, h), i));

4. Using the code below as a reference, explain what behavior should be expected of each of the commented lines, please keep your answer very short:
struct Base {
virtual void Arr();
};
struct SubBase1 : virtual Base {
};
struct SubBase2 : virtual Base {
SubBase2(Base*, SubBase1*);
virtual void Arr();
};
struct Derived : SubBase1, SubBase2 {
Derived() : SubBase2((SubBase1*)this, this) {
}
};

SubBase2::SubBase2(Base* a, SubBase1* b) {
typeid(*a); 				//1
dynamic_cast<SubBase2*>(a);                  //2
typeid(*b); 				//3
dynamic_cast<SubBase2*>(b);           		//4
a->Arr();   				//5
b->Arr();   				//6
}

5. Given the following lines of code, answer these questions:
struct C;

void f(C* p);

struct C {
int c;
C() : c(1) {
f(this);
}
};

const C obj;
void f(C* p) {
int i = obj.c << 2; 			//1
std::cout<< p->c <<std::endl;   //2
p->c = i;   					//3
std::cout<< obj.c << std::endl; //4
}
A. What is the value of i after the first numbered line is evaluated?
B. What do you expect the second numbered line to print out?
C. What is the value of p->c after the third numbered line is evaluated?
D. What does the fourth numbered line print?

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
ScapeCode - Blog | SlimDX

### #38tufflax  Members   -  Reputation: 503

Like
0Likes
Like

Posted 16 August 2011 - 07:31 PM

Well When I jumped into C++ I was so confused, But I stuck with it, and now I pretty good with it. If I were you I'd just stick with it, because eventually you'll want to switch back.

Why? What makes C++ so attractive? I can't think of anything. Quite the opposite. Have you even tried anything else?

### #39way2lazy2care  Members   -  Reputation: 782

Like
0Likes
Like

Posted 16 August 2011 - 09:00 PM

wee

I know the answer to number 2 because I think we've discussed it at length before (if not you then someone else on GD). The other ones I could probably muscle through to at least come up with answers that are wrong but make sense, but it's midnight and I don't have the energy :-p

Do you actually give that test to people or did you just make it for fun?

### #40Washu  Senior Moderators   -  Reputation: 6761

Like
0Likes
Like

Posted 16 August 2011 - 09:44 PM

wee

I know the answer to number 2 because I think we've discussed it at length before (if not you then someone else on GD). The other ones I could probably muscle through to at least come up with answers that are wrong but make sense, but it's midnight and I don't have the energy :-p

Do you actually give that test to people or did you just make it for fun?

You probably discussed it with me, or with other moderators in my stead. The answer appears to be surprising to many people, for some reason. I give it, or variants of it, to people who like to think they know C++. The new standard has given me even more ammunition to use as well, it hasn't improved the picture much at all.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
ScapeCode - Blog | SlimDX

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS