What language to start with?

Started by
27 comments, last by Luctus 15 years, 9 months ago
Quote:Original post by Jonathan5
#include <iostream.h>

main()
{
cout << "Hello World!";
return 0;
}

Is that actual code from a learning resource or just your paraphrase? Because there you have one more problem with C++: a lot of learning resources are outdated and terrible. Problems:
- You should include <iostream> instead of <iostream.h>
- main() should be int main()
- cout should be std::cout
- the return 0; can be omitted
Advertisement
Go with C++. It's what all the pros use. You wanna be a pro, use it.
And BTW, name some big players in the game business (id, Microsoft, Blizzard, Capcom, Epic, Monolith etc) that have EVER used Python... None whatsoever!

Yeah, it's a bit hard, and you have to watch your step like you're in a mine field, but anything is better than to spend ~2 years learning Python, hit its limits, then spend ~2 more years learning how to do it in C++.
Quote:Original post by asdqwe
Go with C++. It's what all the pros use. You wanna be a pro, use it.
And BTW, name some big players in the game business (id, Microsoft, Blizzard, Capcom, Epic, Monolith etc) that have EVER used Python... None whatsoever!

Yeah, it's a bit hard, and you have to watch your step like you're in a mine field, but anything is better than to spend ~2 years learning Python, hit its limits, then spend ~2 more years learning how to do it in C++.


This is terrible advice and also just plain incorrect.

If you want to learn to ride a bike do you start with the types of bikes the pros use? No, you probably start with a tricycle or at least some training wheels.

An entire "big player" game in Python probably doesn't exist but that doesn't mean it hasn't been EVER been used in them.
Quote:
Go with C++. It's what all the pros use. You wanna be a pro, use it.
And BTW, name some big players in the game business (id, Microsoft, Blizzard, Capcom, Epic, Monolith etc) that have EVER used Python... None whatsoever!

Yeah, it's a bit hard, and you have to watch your step like you're in a mine field, but anything is better than to spend ~2 years learning Python, hit its limits, then spend ~2 more years learning how to do it in C++.


What 'big name players' use is entirely irrelevant to the topic of what a beginner should use. Your advice is horrible.
First of all, I have myself started with C++ at a young age.
Second, the "big players" reference was meant to create some enthusiasm, something to fall back on when encountering C++'s pitfalls.
Third, if he's the "I want it now" type, he can download Gamemaker.
It may not be a regular language but it has GML (GameMaker Language)- easy and chock-full of useful mouse, keyboard, sound, even video functions, hardware-accelerated. I've tried it and it gets results done much faster than Python. It even has a level editor.
Quote:Original post by DevFred
Quote:Original post by Jonathan5
#include <iostream.h>

main()
{
cout << "Hello World!";
return 0;
}

Is that actual code from a learning resource or just your paraphrase? Because there you have one more problem with C++: a lot of learning resources are outdated and terrible. Problems:
- You should include <iostream> instead of <iostream.h>
- main() should be int main()
- cout should be std::cout
- the return 0; can be omitted


That was actual code from a learning resource, and yes, I do think it is outdated. As you said, things like the return can be removed, etc. I just googled in "Hello World C++" really quick to give him an example because either way I knew it was much more complex than just simply, "print".
I guess none of these companies are "big players," then?
MIT starts its students off with Java.
My first CS course was about Java.

Take Java.

Its syntax is a nice introduction for C++, looking similar on the surface.
No memory management needed, it is all handled for you by that Garbage collector.

Chances are, if you end up studying computer science, they are going to feed you either C first, or Java first. Both will pretty likely be waiting you down the road. It sure is not the fastest, neither is it the greatest.

But it is widely used in the non-game industries. And after so much time and studying, switching to C++ wont be as much of a chore as it were from our previous computer science opener: Pascal.


Quote:Original post by Stoo
Take Java.

Its syntax is a nice introduction for C++, looking similar on the surface.
No memory management needed, it is all handled for you by that Garbage collector.


I believe Java is a good language to learn about object-oriented style programming, though the way generics and some things like that have been implemented is a little bit questionable.

Though for a complete beginner, I think OOP is a little too advanced to learn straight off without some sort of formal guidance by a college/school. I remember I found it quite alien and difficult to grasp the first time I was introduced to classes and the idea of static variables, objects and dynamic binding.

I think it would be better to start off with a simple procedural language first and then move on to something a little more complicated like Java once you get the basics down. It doesn't have to be for 2 years like mentioned above, just until you are confident with the basic ideas, and then moving onto another language like C or Java would be good and much much easier. I think C would be a little bit better because while it has memory management (which is again good to know), the idea of pointers and structs is a good thing to know when thinking about objects and accessing their members. Also, C is pretty much still a procedural language so it's not a huge leap from other simpler languages.

After all, C++ supports a wide variety of programming paradigms, from monolithic spaghetti code, to procedural structured with functions, to functional, to OOP etc. I think that if you get into the habit of using OOP too early on, you will end up overusing inheritence and other powerful tools and will be tempted to overcomplicate your design. Since Java is purely OOP, it probably isn't ideal to learn straight off.

Another advantage of C, is that it basically introduces you to the syntax of alot of other similar languages including Java, perl, C++ etc. And once you know C, you can be fully appreciative of the advances in memory management and the garbage collector of other languages like Java. Not to mention that millions of lines of code have already been written in C, which means theres ALOT of tutorials and documentation out there to help you learn more.

Of course, this is all still my personal opinion. Really any language is fine to begin with, just some languages will be harder than others for a beginner. Ultimately, you will learn most of the relevant ones anyway, and once you know one, its pretty much a matter of syntax to learn all the others.

I wouldn't start with Java just for the sake of learning OOP, If you wanted to do that just go with C++, i started with lua, a nice little scripting language, fortunatly its a fairly commonly used language in the industry (crysis and WoW to name a couple of the better known games), my first attempt at programming was Java and that failed horribly, as people have mentioned, you will have to learn several languages eventually, so starting like a small (and sloppy) language like python or lua first and then learning somthing a little more robust (i would suggest learning Java and C++) so that you can make some finer programs.

well thats my 2 cents

This topic is closed to new replies.

Advertisement