Jump to content

  • Log In with Google      Sign In   
  • Create Account

Best language to be "versatile" in game making.


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.

  • You cannot reply to this topic
68 replies to this topic

#21 phantom   Moderators   -  Reputation: 7566

Like
3Likes
Like

Posted 08 September 2012 - 03:30 PM

I've been programming in C++ for a little over a year, and according to you it's likely that I have yet to encounter any of the world-ending, flood-causing, tsunami stirring disastrous mistakes that you can make when writing C++. Which means, then, that none of these vague, non-specified horrors actually apply to a beginner. Right?


Wrong.
Just because you haven't seen the outcome of your mistakes does NOT mean you have not made them.
Welcome to C++ - when you do something wrong you don't always get tripped up on it.
Doesn't make what you did RIGHT it just means you've been lucky.

Does it sound vague as a reason? Yes.
Welcome to C++.

I haven't come across them yet, my life isn't a waking nightmare, and I enjoy C++ and coding games with it. So then how is it a bad language for beginners, exactly? I'll never understand this use of vague scare tactics to keep people from just trying the damn language out. Don't do it! There's stuff hidden! You're too stupid to make the mistakes, that's why you haven't made them yet!!!! Oh, well then I guess I'm all good then. And when I do make the mistakes, I'll probably do what you did: Learn from them.


No, it is not a matter of 'being too stupid to learn from your mistakes' it is that C++ makes those mistakes hard to spot, hard to understand, vague due to the massive amount of 'undefined behaviour' which is allowed and more importantly makes the whole process of learning HARDER for BEGINNERS which implies, very heavily, that this is their FIRST language.

Which is why we advice against it and point out that C++ is a BAD language to start with - not that it is impossible but because you are making your life harder for yourself by trying to both learn to program AND learn to program around C++'s own vagueness and issues which is NOT helpful. C++ as a starting language WILL teach bad habits and WILL teach bad design - how do we know this? because we have seen it both in ourselves and many many times over the years.

Typical forum behavior. You see someone who's honest about their possible ignorance and try to inflate it to a size reasonable enough for you to discredit his opinions. Instead of arguing against what I say reasonably, you try to take away my voice by reminding me and everyone else that "You haven't been doing it enough yet to ruin everything." But as I've already shown, if I've been doing it a year and I still haven't encountered the horrors, that means beginners won't encounter the horrors until they're not beginners anymore. And even if I do find out something and want to switch languages, is that the death of my programming career? Is Java an entirely different world? Or Python? Or any other object-oriented language? Was my time spent with C++ wasted? Will I start from scratch? This is ridiculous.


Yes, it is typical behavior of people who have more experiance than you in a subject.
You wouldn't take 1 year of a maths class and then declare that the maths behind QM is easy - nor to should someone who is, regardless of if your ego likes it or not, a beginner in the subject be saying 'oh, I've had no problems, it must be easy'.

Many people with many more years of experiance KNOW you are wrong by saying 'C++ is easy' so YES your lack of experiance IS important when giving advice to other people who are just starting out.

And no, it isn't rediculous it is advice given after years of experiance in both learning the language ourselves and watching others trying to learn it too. Your claim that it is easy and that everyone has to touch it at some point is the thing which is rediculous here.
(Also throwing around sentences like 'world-ending, flood-causing, tsunami stirring disastrous mistakes' in an attempt to make the person you are replying to look like they are over stating the problem is also rediculous and a tactic so transparent you'd have to be blind to not see through it.)

You want to learn C++? Fine. Great. Knock yourself out.
HOWEVER the moment you come here and claim it is 'easy' expect this reply because those of us who know better WILL take you to task on it because not doing so is a disservice to those who follow you and think 'oh hey, this random guy who has only been doing it for a year says it is easy so it must be!' and end up taking longer to learn to code than they might well have done with something like Python (and in many cases Python would have got them where they want to go faster and with less mess than trying to deal with C++).

Edited by phantom, 08 September 2012 - 03:32 PM.


Sponsor:

#22 Servant of the Lord   Crossbones+   -  Reputation: 21068

Like
4Likes
Like

Posted 08 September 2012 - 03:53 PM

@Shaquil: As a fellow C++ user myself, I know what you mean when you say C++ isn't as hard as everyone makes it out to be. C++ isn't "hard" to learn, but it is "harder" than other languages more suitable for a beginner. I learned C++ as my first language (and it's still my primary language), but I did so knowing it'll be harder than other easier alternatives like Python. So though I made that choice for myself, when people ask my recommendation for a beginner, I recommend Python.

One thing Python has over C++: Run-time interpretation, meaning no need to compile, meaning faster development time and easier experimentation for beginners trying to learn.

Why is C++ harder (though not "hard") that Python or some other languages?
1) It's more low-level, which requires more boilerplate to learn. It requires alot of, "Don't ask what this does, you'll learn about it later in the tutorials in chapter 27 - it just works, okay?".
Example:
std::cout << "Hello world!" << std::endl;
  • Why is the bitshifting operator << being used here? Operator overloading, you'll learn about it later.
  • What is the weird 'std::' or the 'using namespace std;' doing? Namespaces, you'll learn about them later.
  • What is 'std::endl', and why am I printing it like text? It's actually a callback function being passed in to std::cout - you'll learn about how it works later.
  • What is std::cout anyway? An ouput stream class inherited from ios inherited from ios_base - you'll learn about classes and inheritance later.
  • Why are there brackets in std::vector<int> and what do they mean? Templates, you'll learn about them later.
This isn't bad, and will always be there to some extent (C++ just happens to have alot of that), but does add to confusion (and fear) in people learning it. I personally avoided templates for a long time, because I was afraid of them. Posted Image
Note: I avoided using classes that use templates. I didn't actually write my own templated classes for even longer.

2) C++ also has alot of "Don't pay for what you don't need", which is one of it's strengths... but new programmers don't know about what they do need, and when they do know, they don't know it already exists and is waiting for them to use. How many C++ new users stick with char* strings because someone told them not to use std::strings, or because the API they use requires or returns char*, and they don't know they can convert to and from std::string?
How many manually use new and delete (because they saw someone else do it), when variables on the stack would be better in 90% of their cases, and shared pointers in the other 9%?

3) C++ is a great language. It is powerful, it is flexible, it is stable, it is fast. But it also requires you to have alot of knowledge about how and when to use what it offers, that requires alot more memorization for someone who is at the same time trying to learn programming in general. C++ has alot of features, and some non-uniform syntax issues, and so many corner cases and asterisks that a programmer won't learn for years before he suddenly encounters them. Even this week, I was surprised to find out (in a forum thread here by someone actually using them) that C++ allows 'and' and 'or' as keywords instead of the much more common && and || - and I've been programming C++ for 7 years. Posted Image

The C++11 standard makes C++ much better for new (and old) users. But I can't truly recommend that to new users, because of a real lack of books and tutorials teaching beginners in the new C++11 way (there are some, but google will turn up way too many old C++ tutorials), and also, a lack of full support for C++11 from IDEs and compilers, though we are getting closer. When C++11 practices are mainstream in the C++ community, then it'll be much easier to recommend new programmers to start there. And even so, that'll make it (hopefully) even with Python in terms of friendliness to new programmers.

Learning Python teaches you the basics of programming in general, which when you do decide to pick up C++, makes it much easier. Also, you won't give up Python when you learn C++, you'll use them both. So it's not like it's wasted effort.
It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#23 game of thought   Members   -  Reputation: 213

Like
0Likes
Like

Posted 08 September 2012 - 06:00 PM


But when we're talking about making games, I reiterate, you're going to have to read some C at some point).


No you aren't.
There is no ultimate 'you must use a C language for making games' requirement anywhere.

People make games in Python, in C#, in Java, in JavaScript, in Lua and others without touching a line of C or C++.

If Python fits the need of the OP then there is NOTHING to be gained by going to a more complex language which is considerably more dangerous to use. And lets not fools ourselves here; C++ IS a complex language. Yes, you can use it for a year and go 'hey, there is nothing hard here..' but that's because you've been using it for a year and you've no idea what lurks in the darker areas of the language or how many mistakes you have already made which haven't come back to bite you yet.

At one year of using C++, more so if its your first language, I do not believe you are qualified to say how hard the language is. You are still very firmly a beginner and more than likely are making mistakes which you are lucky haven't blown up in your face yet. I work with professionals on a daily basis who have been using C++ (as well as many other languages; C++ is not an end point either, most professionals if any degree of skill will know a few languages and can switch between them at will) for years and still make mistakes which can lead to hours in a debugger tracking them down.

So no, C++ is not easy.
It might look easy but that's just because you don't know what you are doing wrong.
(and that's coming from someone with 10+ years of using the language behind them.)

I know that from personal experience

In my opinion it depends on platform really, i would pick c# for windows because of XNA and its xbox and windows phone support while on others i would say python and pygame due to the simplicity of it of the day i have tested it.

Good luck

#24 JTippetts   Moderators   -  Reputation: 8652

Like
2Likes
Like

Posted 08 September 2012 - 06:25 PM

Guys, let's not turn this into a language flame war thread, okay?

@OP: As you can see, it's not really about the tools so much as it is about the craftsman. Any of the languages mentioned will be more than enough for your needs, and any language you choose is going to offer up plenty of learning opportunities. There is a lot of argument and discussion about the easiest language, the hardest language, etc... but rest assured that all of them offer challenges aplenty, and all of them offer ways to both create awesome things and shoot yourself in the foot many times in the process. The important thing is that whatever you choose, be it C#, C++, Python, Lua or something more esoteric like D or even (don't do this) Brainf**k; stick with it and give yourself plenty of time to learn it and gain experience. A good programmer can change languages very quickly; after all, most languages have far more in common with one another than differences.

#25 JETeran   Members   -  Reputation: 280

Like
0Likes
Like

Posted 08 September 2012 - 06:27 PM

C++ is widely considered the "main" gaming language.

You can't be more right !!

Success with courage,

José Eduardo Terán

Project Management & Game Programming. DSK International Campus

Indie Game Developer
Google + Account


#26 Shaquil   Members   -  Reputation: 815

Like
-3Likes
Like

Posted 08 September 2012 - 08:00 PM


Typical forum behavior. You see someone who's honest about their possible ignorance and try to inflate it to a size reasonable enough for you to discredit his opinions. Instead of arguing against what I say reasonably, you try to take away my voice by reminding me and everyone else that "You haven't been doing it enough yet to ruin everything." But as I've already shown, if I've been doing it a year and I still haven't encountered the horrors, that means beginners won't encounter the horrors until they're not beginners anymore. And even if I do find out something and want to switch languages, is that the death of my programming career? Is Java an entirely different world? Or Python? Or any other object-oriented language? Was my time spent with C++ wasted? Will I start from scratch? This is ridiculous.


Yes, it is typical behavior of people who have more experiance than you in a subject.
You wouldn't take 1 year of a maths class and then declare that the maths behind QM is easy - nor to should someone who is, regardless of if your ego likes it or not, a beginner in the subject be saying 'oh, I've had no problems, it must be easy'.


Did you honestly compare C++ to the mathematics behind Quantum Mechanics? I think that's a fitting end to this conversation.

#27 jbadams   Senior Staff   -  Reputation: 19384

Like
2Likes
Like

Posted 08 September 2012 - 08:10 PM

I'd like to have a go at addressing one of the points Shaquil has raised:

C++ is widely considered the "main" gaming language. It's what industry professionals use, it's what indie devs use, and it's what you'll probably have to learn eventually.


Yes, C++ is generally the go-to language for professional developers working on AAA projects, but it increasingly isn't what indie developers use, and there's absolutely no reason the OP will necessarily have to learn it eventually. Even in the industry, it's increasingly common the use C or C++ for lower-level performance critical code and a higher-level language (Lua, Python, UnrealScript, UnityScript, et al.) for the rest of the code.

The reasons professional developers often choose C++ are, for the most part, sensible and pragmatic, but many of them simply do not apply to someone who isn't coding in that environment with that level of experience:
  • AAA studios often employ large teams of developers, many of whom already have extensive experience with C++. The average beginner will be working alone or in very small teams for at least a couple of years, and by definition does not have any background experience.
  • Consoles often have limited compiler and library support, forcing professional to work with what is provided or spend a lot of time and resources working on their own new tool chains. Beginners are rarely (if ever) placed in this environment, and therefore need not be limited in this way.
  • AAA studios have large existing code-bases written in C or C++ and can often save time and effort by building upon that code. The average beginner does not have an existing code-base, and will either be starting from scratch or working with third-party code; as long as there are some good libraries available in their language of choice they should be fine.
  • Professional developers have the knowledge and experience to take advantages of the lower-level access that C++ can provide to write more optimal code, and often need to do this to meet their performance targets. Beginners do not have those difficult-to-achieve performance targets, and lack the experience to make the necessary optimizations anyway.
Indie developers are increasingly using languages other than C++, although it does remain a popular choice. C#, Lua, Flash-targeting languages (ActionScript, Flex, HaXe), JavaScript, and others are being used for their advantages in productivity, and are perfectly capable of providing a performant and professional-quality game play experience.


That being said, you're right that there are a lot of libraries and documentation available to C++ developers of any skill level, and that there is plenty of support available. These are real points in favour of the language -- but not necessarily an advantage given the same is true of many other options as well. I think C++ is a valuable language to learn, and I think it will continue to be a useful language for years to come; but I remain unconvinced that it's a good choice for the average beginner.

Edited by jbadams, 08 September 2012 - 08:12 PM.


#28 L. Spiro   Crossbones+   -  Reputation: 14272

Like
1Likes
Like

Posted 09 September 2012 - 12:32 AM

Shaquil is not making his point very well, but he is not wrong.

No, it is not a matter of 'being too stupid to learn from your mistakes'

That is not what he said. He said he is too stupid to make them. Which is basically how it works.

You will have more opportunities to make mistakes once you get into advanced class usage, multiple inheritance, and exceptions, but beginners are limited in the mistakes that are available to them. For someone who is just barely more advanced than getting a Windows® window on the screen, using a few classes with no or few virtual functions, and a bit of dynamic memory, the only real mistakes available are related to leaking memory/handles (obviously design issues are not considered here) and bad memory access.

C++ provides you chances at shooting yourself in the foot around every corner, but you are all making it seem as if it is possible to turn 2 corners at once.
We grow up in any language by taking one corner at a time. We turn the next corner when we are ready.



Wrong.
Just because you haven't seen the outcome of your mistakes does NOT mean you have not made them.

That is quite likely true. But the counter-argument is that having a language hold your hand is not very beneficial for your overall growth either. If you aren’t allowed to make mistakes, you aren’t able to learn from them.
I am sure his code is full of errors, and if it is then he will someday have a chance to learn from them, if not now.



As for the actual question, everybody’s growth will be different.
I started with languages that had no manual allocation system, so when I moved to C++ it took me a lot longer to figure out how to properly handle my memory.
If I had started with C++ I would have learned this sooner, but would have had other difficulties in other places.
Some people recommend Python whereas I am glad I have never had to write a line of Python in my life.
Everyone’s learning experience will be different. Why don’t you just pick a language and see how it works out?
Start with C++ and, if it overwhelms you, downgrade yourself to a different language.
I started learning C++ and Glide graphics programming at the same time and I realized it was too much. I took Glide off my plate and focused just on C++ and re-tackled Glide a year later when I had better footing.


The problem with asking people on a forum is that it assumes we know you and your abilities.
Again, everyone is different, so know your own abilities, try the language of your choice, and see how it goes for yourself. Programming in any language is hard and no matter what language you choose you have many years of hard lessons to learn and changes in your mentality and style ahead of you. So just get on with it.


L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#29 MichaBen   Members   -  Reputation: 481

Like
0Likes
Like

Posted 09 September 2012 - 02:52 AM

Personally my idea that those so called 'easy languages' are a joke, they are not easy and allow you to screw up very badly as well. My programming history stated with BASIC on a commodore 64, although I never made any serious and larger projects back then. On the PC I started with visual basic, as that was suppose to be easy. Truth is, it's not. My first application made with VB crashed more often then the first project I made with C++, it didn't do what it was suppose to do in lots of cases and eventually got abandoned because the code base was simply unmaintainable. Clearly, choosing an 'easy language' here didn't help to guarantee the success of the project.

In my experience, the language is a minor factor in the learning curve, and your learning method and attitude are of major influence on how easy or hard it will be. Trying to take steps that are to large will undoubtedly result in failure, no matter the language. If you start with learning how to program by making a MMORPG, you will probably not succeed. However if you take small steps, using a good book or tutorial, you should be able to learn any language you want. With some languages you might be able to jump to get more results quicker, like jumping into 3D much faster, however as said this does not give guarantees for the success of the project, as going to fast in any language is bad.

In fact, it's very dangerous to use a so called 'easy language' in order to get results faster, as you may be rushing over the basic fundamentals and jump into GUI or 3D to fast, and eventually the project becomes unmanageable because you rushed over the fundamentals. I'm not saying you shouldn't use these languages, but not for the reason of being able to jump into 3D programming faster. While C++ might have it's raw memory management that needs to get used to (although you don't have to touch that for your first c++ program at all), but a garbage collector isn't something you don't have to understand either, it has several pitfalls and nasty side-effects (object resurrection anyone?) so also for managed languages you really have to understand memory management after all or your project will fail.

In the end, I would say if somebody wants to learn C++ straight away, let him. It may take longer to get a 3D scene up and running, but what is the use in quickly getting simple 3D scene up and running if you then have to throw away your code because you skipped the basics and the code is unmanageable and you have to start all over again rather then extend it into your game? You should set your goals straight, don't try to make a game if you want to learn how to program, learn to program instead. If your goal is to make a game rather then to learn how to program, then you shouldn't use C++, but neither should you use any other programming language, pick an engine with a ready-to-use level editor with a simple (preferably visual) scripting language that allows you to write small pieces of script logic, rather then whole programs. By writing small independent pieces of script code you don't have the risk of getting unmanageable code, as there is no direct relationship between the individual scripts, as with a whole program.

#30 phantom   Moderators   -  Reputation: 7566

Like
0Likes
Like

Posted 09 September 2012 - 03:33 AM


Wrong.
Just because you haven't seen the outcome of your mistakes does NOT mean you have not made them.

That is quite likely true. But the counter-argument is that having a language hold your hand is not very beneficial for your overall growth either. If you aren’t allowed to make mistakes, you aren’t able to learn from them.


The problem is that until you see those mistakes you can't learn from them.

You can write C++ code which during an array traversal wanders out of bounds and gets away with it because you've been lucky. You never encounter the error, you never learn from it.
Something like C# is going to very quickly yell at you about doing so giving you a chance to catch the mistake and the algorithmic error which comes from it allowing you to learn.

It's about setting up solid foundations, the ability to reason about a problem and write the code without being tripped up by the little things along the way.

Once someone decides to learn to work with C++ this will give them a sound basis to work from when it comes to programming knowledge and make the transistion to the unprotected world of C++ easier.

#31 phantom   Moderators   -  Reputation: 7566

Like
0Likes
Like

Posted 09 September 2012 - 03:40 AM

In the end, I would say if somebody wants to learn C++ straight away, let him.


And no here is stopping anyone so...?

It's not about 'letting' people do anything, it's about laying out that C++ is NOT easy as was claimed.
If someone still wants to go off and work with it then it's not like we could stop them and when they rock up there with the questions people will still help them.

It's about making an informed choice about how you are going to spend your time; if you don't need the complexity of C++ because you are just starting out or your project simply doesn't need it (and most projects don't; our build system at work was written in python, the new version is C#, most of our tools are either python or .Net based, only the main game is C++ because it is aimed at consoles where we have no choice and we need C++) then picking C++, without being informed, it's the wrong choice.

It is simply an extension of The Right Tool For The Job and it is also a good starting place because it gets people, very early on, use to the idea that if you are serious about this then you won't stop at once language you'll keep picking up new ones so the fact you didn't start with C++ doesn't matter.

(C++ was in fact the 5th language I learnt, and then a couple of languages later I learnt it again properly - and yes, I started with an 'easy' language too in BASIC as that was all I had access to.)

#32 t-boy   Members   -  Reputation: 135

Like
0Likes
Like

Posted 09 September 2012 - 04:06 AM

I'd vote for the Monkey programming language Posted Image very close to Java, although still in it's infancy, Monkey is a pleasure to work with, but that's
my opinion.

Edited by t-boy, 09 September 2012 - 04:07 AM.


#33 Karsten_   Members   -  Reputation: 1655

Like
-1Likes
Like

Posted 09 September 2012 - 04:16 AM

While I will try not to jump on the "C++ vs the_world" bandwagon again today, (Seem to have been doing it all week :/) the OP did ask for opinions on "best language to be \"versatile\" in game making" and I am not entirely sure that the chosen python language fits this.

For example, now he has had to go with pygame as the underlying library. Versatile should surely mean that they are free to choose any library / engine they want and without an extremely good knowledge of python (more so than would be needed to learn C++) I would not advise wrapping native libraries up in python just to use them as a beginner.

As it stands, there are more native "game making" libraries for pure C and C++ than there are bindings for any other language so these languages must surely be the most versatile.

Afterall, if you are going to use the library specifically for the language, then Ada and Ada's SDL bindings surely sounds just as versatile as python. Not to mention distribution via a gnat binary will also be easier than getting all your users to install a python interpreter (which on Windows is still a pain).

Edited by Karsten_, 09 September 2012 - 04:16 AM.

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#34 jbadams   Senior Staff   -  Reputation: 19384

Like
1Likes
Like

Posted 09 September 2012 - 04:43 AM

For example, now he has had to go with pygame as the underlying library.

In addition to PyGame, Python users have Pyglet, PySFML, Panda3d, PyOgre, and presumably others I'm not aware of. Python users are hardly short of options when it comes to libraries.

I'd agree there are more options available to C++ users, but there are plenty of good libraries available to Python users, and once more advanced they will also have the option of binding to libraries that aren't currently supported.


Additionally, in this particular case the original poster's definition of versatile as given at the start of the topic doesn't actually call for multiple libraries. Had the decision instead been to use C++ we would be advising the choice of a single library; quite possibly SDL, which PyGame is a binding for. The availability of additional libraries isn't really a serious concern in this case, and isn't really what the original poster was asking for.


Windows distribution is admittedly still an area where Python is a little weaker than alternatives -- but it's also something a beginner won't have to deal with immediately, and for which there are some existing solutions.

#35 JETeran   Members   -  Reputation: 280

Like
1Likes
Like

Posted 09 September 2012 - 07:40 AM

In the end, I would say if somebody wants to learn C++ straight away, let him.

I really loved your point of view and you can't be anymore right !!

Thanks for posting your opinion.

Success with courage,

José Eduardo Terán

Project Management & Game Programming. DSK International Campus

Indie Game Developer
Google + Account


#36 Shaquil   Members   -  Reputation: 815

Like
0Likes
Like

Posted 09 September 2012 - 07:58 AM

Shaquil is not making his point very well, but he is not wrong.


What do you mean? My point was made pretty well in my original post. In fact, I expected it to get downvoted to hell because people would venemously disagree that C++ should ever be looked at or spoken of, but it's got 7 upvotes.

Phantom's supposed real problem is that he thinks I said C++ is easy. Here's what I said:

1. C++ is not nearly as hard as you think.


In response to that, he tried to discredit my ability to speak on this topic which you and several others have clearly shown is utterly subjective. The best way to make it so you don't have to build counterpoints to someone's points is to make sure the person can't raise anymore points. But I'm not going to let him do that. That's been my argument.

The whole C++ is easy nonsense is none of my concern. I didn't say that or even imply it. It's some fake sticking point he made up, and I'm not interested in recognizing it as a true point of debate.

As it stands, there are more native "game making" libraries for pure C and C++ than there are bindings for any other language so these languages must surely be the most versatile.


I'd agree there are more options available to C++ users, but there are plenty of good libraries available to Python users, and once more advanced they will also have the option of binding to libraries that aren't currently supported.


This exchange is a perfect example of what actually should have happened.

And one more thing: To those of you who might, for some unfathomable reason, think that the comparison of C++ to any form of advanced mathematics is a realistic one, you need a wakeup call: Let's say we compare C++ to Calculus. Can someone who knows nothing but basic arithematic learn C++? Absolutely. Can someone who knows nothing but basic arithematic (PEMDAS) learn Calculus? Absolutely not.

Any beginner C++ tutorial will teach you from the absolute ground up: Operators, variables, control structures, functions. It's all there for you. On the other hand, I challenge you to go find a book devoted only to Calculus that teaches you polynomial multiplication/division, let alone how to factor, let alone what a variable even is. Calculus has a prerequisite of many, many years of mathematical education. C++ has a prerequisite of knowing how to read, type and do basic arithematic. If you can start learning Python, you can start learning C++. But if you can start learning C++ does that mean you can start learning Calculus? Or Quantum Mechanics? To compare the two is just another wild delve into hyperbole, no better than comparing the errors you can make in C++ to handling a "nuke with rusted wiring" as someone else said previously. It's pure insanity.

You've got to be absolutely kidding me.

Edited by Shaquil, 09 September 2012 - 08:00 AM.


#37 phantom   Moderators   -  Reputation: 7566

Like
1Likes
Like

Posted 09 September 2012 - 08:24 AM

And one more thing: To those of you who might, for some unfathomable reason, think that the comparison of C++ to any form of advanced mathematics is a realistic one, you need a wakeup call:


It is called a 'smilie' where the progress of learning in one situation was compared to the progress of learning in another situation.

I did not comapre C++ to QM as you seemed to think, I compared a situation where a beginner in one field questions the experise of someone in the same field when they don't have the expertise to do so.

At no point did I say 'OMG! C++ IS LIKE QM! LULZ!' or whatever insanity you seemed to read - I liked two situations to give you an idea of the 'insanity' (a word you seem very fond of) of your position where you seemed to think that your whole year of C++ gives you some real insight into the subject.

#38 Shaquil   Members   -  Reputation: 815

Like
0Likes
Like

Posted 09 September 2012 - 08:41 AM

And yet you still have failed to actually prove anything I said wrong. You continue to fall back on the tried and true "Who does this guy think he is?" tactic. You think you're going to talk down to me enough that at some point you'll get the last word and I'll be quiet like a good boy, but it's not going to happen. Your refrains are these:

"C++ is not easy." Cool, I'm glad we agree.

"You're still a beginner, so don't give advice to a beginner." Now wait a minute. If this is in fact one of the things you're trying to tell me, that's nonsense. You've been doing this for ten years you say? What was C++ like ten years ago? What was it like to be a beginner ten years ago? I dunno. Do you? Do you even remember most of the problems you had, let alone all? I know a lot more about being a beginner than you do. I remember all the things that got in my way, all of the self-started projects I completed or never even got halfway done on. In this department, your ten years work against you.

You think about all the problems you've had with C++, and most of them might truly be far too advanced for a beginner, but as has been said: That means a beginner probably won't run into them. And if he makes those mistakes, so what? Is it mission critical code? He'll learn the best way to do the things he's been doing later. Just like when you start off writing code like int box1, int box2, etc, and then later you learn "Oh, that's what arrays are for. Bad habit erased."

And here's your quote:

Yes, it is typical behavior of people who have more experiance than you in a subject.
You wouldn't take 1 year of a maths class and then declare that the maths behind QM is easy - nor to should someone who is, regardless of if your ego likes it or not, a beginner in the subject be saying 'oh, I've had no problems, it must be easy'.


And my point still stands. It's a terrible example. The different fields of math build upon one another. But that's not necessarily true for the different programming languages. You don't need to learn JavaScript before you learn C. And you don't need to learn C before you learn C++. On the other hand, you need to learn Algebra and Geometry before you learn Trigonometry. And so on.

Edited by Shaquil, 09 September 2012 - 08:43 AM.


#39 phantom   Moderators   -  Reputation: 7566

Like
0Likes
Like

Posted 09 September 2012 - 09:21 AM

"You're still a beginner, so don't give advice to a beginner." Now wait a minute. If this is in fact one of the things you're trying to tell me, that's nonsense.


Show me.
Go on.
Pull a quote where I said precisely that.

I'll wait...

You can't complain about being talked down to and attacked when you go around blowing things out or proportion and misrepsenting what others have said.

You've been doing this for ten years you say? What was C++ like ten years ago? What was it like to be a beginner ten years ago? I dunno. Do you? Do you even remember most of the problems you had, let alone all? I know a lot more about being a beginner than you do. I remember all the things that got in my way, all of the self-started projects I completed or never even got halfway done on. In this department, your ten years work against you.


My own personal experiance in general beginner problems isn't relivent, nor in the area of being a beginnner did I claim that my experiance was. By the time I got to C++ I'd been programming for 10 years, including one assembly language variant and a brief stint in early Java.

However my experiance with C++ gives my view of C++ more weight and my observations over the 10 years of my being on this site give me a pretty good idea of the problems that beginners suffer from in C++ and the problems that come up when they try to deal with it.

You think about all the problems you've had with C++, and most of them might truly be far too advanced for a beginner, but as has been said: That means a beginner probably won't run into them. And if he makes those mistakes, so what? Is it mission critical code?


If the code is mission critical or not is utterly unimportant.
But ok, lets take something which is simple C++; a Standard Container.
Those things can blow up with some of the most god aweful error message you'll ever see.
Yet they are key and central part of the language; somethinig a beginner should be starting with from practically Day 1 (if you are doing strings via char * or dynamic arrays of memory via <type> * then you are Doing It Wrong). Yet these areas can produce some of the most hard to understand and track back error messages out there.

And even if you fall back to doing char * strings or <type>* memory allocation you now run into the world of no bounds checking where you can do as you like and nothing will tell you otherwise until something blows up in your face.

I've seen beginners confused by things relating to 'access violation at address 0x000000c' which I can look at and say 'oh, it's this...' right away but they have no idea about. And yet allocating instances of types and calling functions on them is central to C++ but not for learning to program and can be taughted better in language which tell you via better error messages what has gone wrong. Try missing of a ';' somewhere in a header and watch the explosion of error messages which happen due to one tiny syntax error which has no impact on the ability of someone to learn the basics of programming.

Hell, there was an example recently of someone being confused because they could apprently call a function via a null pointer to a class without things going wrong.

The C++ standard itself is known for using the word 'undefined' or 'implementation defined' through out its language.

None of the things I've mentioned above are 'advanced' and yet I've seen over the years people repeatedly trip up over them and then the resulting cryptic error messages/reactions from the runtime which can come about from it.

Edit: you can also add to that list compile times, header files, pathing issues and libraries.
Again none of those are advanced but being forced to deal with them just to learn is, to use your phrase, 'insane'.

He'll learn the best way to do the things he's been doing later. Just like when you start off writing code like int box1, int box2, etc, and then later you learn "Oh, that's what arrays are for. Bad habit erased."


But it's not just Bad habits like that - C++ carries with it a massive legacy and with it comes 'advice' which might have been important 10 or even 5 years ago but these days is worthless.

New C++ programmers, the ones who seem to defend the language with such tenacity (or ones who only know C++ like it is the only thing worth knowing), are also the biggest source of 'not made here syndrome' - many shunning the standard library as if it is some slow and horrible thing, instead favouring that own bug ridden versions, because they once read somewhere that it was slow. This persists going forwards and instead of taking advantage of tools which exist they go on to try and reinvent everything because they feel somehow they will 'learn more' (also the classic excuse of someone who wants to make a game but believes making an engine first is a good idea).

This is a mind set which is VERY hard to break and one which continues to be recycled from programmer to programmer as someone new starts all the other newbies around them just tell them what they have done themselves.

(I figure it must be some kind of self reinforcement cycle - "if someone else does it then I can't be wrong" but that's far far off topic).

All of the above is why, when compared to other languages, C++ is lacking.

Yes, C++ has it's strengths, one of which is being on all platforms and other of which being if you know what you are doing you can get more out of it than maybe you can in another language HOWEVER those two arguements are utterly moot because they are advanced topics (often requiring knowledge of the target platform and how the code generation can work) and you have already stated that advanced things don't matter to beginners.

When you are starting out getting told what you are doing wrong is more important than speed or frankly other considerations beyond learning the art of programming.
C++ makes this harder than it needs to be.

Edited by phantom, 09 September 2012 - 09:23 AM.


#40 Memories are Better   Prime Members   -  Reputation: 769

Like
1Likes
Like

Posted 09 September 2012 - 09:39 AM

My friend and I are small coders, know some here, know some there, but...We are looking for a language to be open to make any kind of game, I do not mean FPS or something like that witch requires Unity, UnReal, etc. We are looking for a CODING language that can be made into 2d, Not any 3d! And by games I mean 2d-sh game, aka at a angle, and it be able to be used on any type of game like that and be made to look nice and PROFESSIONAL, I was thinking C/C++ or Java, what do you guys think? Maybe even top down, or complete side view, please reply! Posted Image


I am sure any language can be used to achieve any of those results.

I have previously hated on C++ so unfairly so I cant criticise the negative comments people have made about the language here, I have in the past few months started using the language heavily and honestly I can understand some of the compliments the language gets but I also only need to do work in C++ when necessary and I cant really say that is often, but this is of course me and I cant speak for others.

However it must be said that picking a language should not be based on what others have said, but should be based on what you are doing, what experience you have with current languages / libraries and what libraries you will likely want to use. For example if you wanted to use WPF, you wouldnt pick Java, same as if you wanted to make a PHP website you wouldnt pick C++, I think the point people are forgetting here is the language you pick depends on what you are going to be doing.

As for your requirements many languages & libraries can provide for your needs, ultimately depending on what libraries you pick or what you require will determine what language is 'better'.

The only other thing I will mention is, you dont have to stick with one language only, my current projects heavily depend on C++ and C#, both work very nicely together, I use both for different things and would have greatly struggled with my work if I religiously picked one only. Would I recommend C++ to a beginner though, well that depends on what the beginner wants to do now and in the future and most of the time C++ just seems to be unproductive for what beginners require but is still a great language to learn.




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