Jump to content

  • Log In with Google      Sign In   
  • Create Account


learn C or C++ ??


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
44 replies to this topic

#21 Mercenarey   Banned   -  Reputation: 103

Like
0Likes
Like

Posted 15 September 2007 - 11:13 AM

So let me get this straight:
We now recommend either Python, a language that is used for nothing but scripting in the industry -

or
SmallTalk!

Is this turning into a "I know more languages than you!" discussion, or are we still talking seriously giving this guy advice?

In the 70's and 80's everyone and his mother made a programming language and there are probably thousands by now, why don't we just list them one at a time?

Sponsor:

#22 Mercenarey   Banned   -  Reputation: 103

Like
0Likes
Like

Posted 15 September 2007 - 11:19 AM

Quote:
Original post by rip-off
Quote:

Java? Does that even communicate with DirectX or OpenGL?


Yes. It can talk to anything C can using the Java native interface...


Well, if you add CORBA to the pot, any language talks with anything...
Im just pondering why people use some obscure, slow 3D API for Java games if it talks (natively!) with OpenGL.

#23 rip-off   Moderators   -  Reputation: 8109

Like
0Likes
Like

Posted 15 September 2007 - 11:20 AM

Quote:
Original post by Mercenarey
So let me get this straight:
We now recommend either Python, a language that is used for nothing but scripting in the industry -

or
SmallTalk!

Is this turning into a "I know more languages than you!" discussion, or are we still talking seriously giving this guy advice?

In the 70's and 80's everyone and his mother made a programming language, why don't we just list them one at a time?


We are recommending python as it is a fine language, and has a great 2D library, pygame (SDL wrapped in python code).

The OP mentioned only "industry", which may or may not refer to the games industry.
Quote:

something i will need to work in the industry. more specifically, computer networks, communications, telecommunications and whatnot.


Having many languages under your belt is good thing. Learning *any* language will be beneficial (except maybe COBOL [grin]). We are not recommending the OP *never* learn C++. But certainly not as a beginners language. Python fulfils all the requirements of being a reasonable, multi-purpose language with a nice game library.

#24 MaulingMonkey   Members   -  Reputation: 1556

Like
0Likes
Like

Posted 15 September 2007 - 12:02 PM

Quote:
Original post by Mercenarey
We now recommend either Python, a language that is used for nothing but scripting in the industry -

If your definition of scripting is that broad, then most of game programming is scripting (and you'll certainly agree that neither C nor C++ make good scripting languages, right?).

It then follows that one should focus on scripting languages first, being that not only do they encompass most of modern game programming, but can be used to make complete games on their own, without the learning-cliff that is C/C++ impeding their way right from the get go.

#25 flyingcat   Members   -  Reputation: 122

Like
0Likes
Like

Posted 15 September 2007 - 12:25 PM

Language is just a tools,so it not very important to choose which one to learn if you can master any one of them,
C# and JAVA are quick develope tool,and easier to learn compared with C++,they do some thing for you(such as manage memory),so if you want to know better about
how does this things works,you can choose C++.
finally,good luck!


#26 Mercenarey   Banned   -  Reputation: 103

Like
0Likes
Like

Posted 15 September 2007 - 01:08 PM

So someone gave me minus points?
Rofl...

I'll just stop trying to help altogether.

#27 mikeman   Members   -  Reputation: 2195

Like
0Likes
Like

Posted 15 September 2007 - 01:41 PM

Quote:

Python? Are you serious? Are we not discussing programming languages? Python is a scripting language AFAIK.


Care to tell us the difference? If you mean that it's suited for creating small scripts that run embedded in a larger C++ app, then no. In fact, if you go for embedding you better choose a more lightweight tool, like Lua. Python is a very high-level full-fledged programming language with a very rich standard library and many quality 3rd-party libraries that is best suited for writing the entire application in it, and maybe extend the critical modules in C++ if you're hungry for performance. So, why the "industry"(with exceptions like EVE Online,Civ4 and so forth) doesn't do it in a greater extent? Who cares. We don't, and a beginner certainly doesn't. The industry has a million reasons to do things the way it does, and none of it affects us hobbyists and indies.

Anyway trapeze, since you're just starting your goal is to learn to think like a programmer. So for a first language pick something that makes your life easier and helps you focus on the important concepts instead of technical details. Python and C# are such languages. I suggest you pick one of them. Of course, you will eventually also learn C,C++, and hopefully a bunch of other languages, but for a beginner, C or C++ are not really advisable.

[Edited by - mikeman on September 15, 2007 7:41:47 PM]

#28 Mercenarey   Banned   -  Reputation: 103

Like
0Likes
Like

Posted 15 September 2007 - 01:58 PM

http://en.wikipedia.org/wiki/Scripting_language

I have only seen Python being used as a scripting language. And since it is interpreted, it is far from as fast as a binary program, like those created by C++.

Furthermore, it is often referred to as a OO Scripting Language.

I admit that I didn't know enough about Python, and referred to it from the knowledge I had.
However, no matter if you can develop all with Python or not, you must admit that it is best utilized as a scripting language, since it is interpreted, and thus slow. Games are known to be power hungry.

No matter what, I still recommend the guy to learn C++ - especially if he wants to work in the industry. After having learned C++, everything else will be easy.

#29 mikeman   Members   -  Reputation: 2195

Like
0Likes
Like

Posted 15 September 2007 - 02:02 PM

Quote:

http://en.wikipedia.org/wiki/Scripting_language


So, "scripting" means "interpreted", instead of "compiled". It has nothing to do with what the language can actually do. Pretty pointless distinction if you ask me.

Quote:

And since it is interpreted, it is far from as fast as a binary program, like those created by C++.


So? The OP wants to know which language is best to learn programming with. What "speed" has to do with that? What kind of a program will a beginner make that would require performance not provided by Python?

#30 Mercenarey   Banned   -  Reputation: 103

Like
0Likes
Like

Posted 15 September 2007 - 02:06 PM

I edited my above post after you replied, sorry.

Quote:
Original post by Mercenarey
I admit that I didn't know enough about Python, and referred to it from the knowledge I had.
However, no matter if you can develop all with Python or not, you must admit that it is best utilized as a scripting language, since it is interpreted, and thus slow. Games are known to be power hungry.

No matter what, I still recommend the guy to learn C++ - especially if he wants to work in the industry. After having learned C++, everything else will be easy.


He stated clearly that he wanted to work in the industry. And he named areas like networking. I couldn't imagine doing that in an interpreted language exclusively.

#31 Mercenarey   Banned   -  Reputation: 103

Like
0Likes
Like

Posted 15 September 2007 - 02:10 PM

Quote:
Original post by Wikipedia
http://en.wikipedia.org/wiki/Scripting_language

Scripting languages (commonly called scripting programming languages or script languages) are computer programming languages that are typically interpreted and can be typed directly from a keyboard. Thus, scripts are often distinguished from programs, because programs are converted permanently into binary executable files


Notice the last line:
"Thus, scripts are often distinguished from programs, because programs are converted permanently into binary executable files."

Im not saying that Python should be classified as a scripting language exclusively on this description. However, you can't blame me for my assumption.

#32 Scet   Members   -  Reputation: 960

Like
0Likes
Like

Posted 15 September 2007 - 02:13 PM

Quote:
Original post by Mercenarey
I have only seen Python being used as a scripting language. And since it is interpreted, it is far from as fast as a binary program, like those created by C++.


A program written in pure x86 assembly should be faster(in theory) then a C++ program, why don't you program in assembly?

Quote:
Original post by Mercenarey
However, no matter if you can develop all with Python or not, you must admit that it is best utilized as a scripting language, since it is interpreted, and thus slow. Games are known to be power hungry.


You make it sound like he'll get 2 frames per second. It's slower, not slow. I think if you actually took the time to learn Python, Mercenarey, that you'd find it is a lot easier to make programs with then C++ and is fast enough for most people. Anyone working by themselves isn't going to be making anything close to commercial quality anyway.

Quote:
Original post by Mercenarey
No matter what, I still recommend the guy to learn C++ - especially if he wants to work in the industry.


Our point is that he doesn't have to learn it first. He can deal with basic computer science concepts first and struggle with syntax later.



#33 mikeman   Members   -  Reputation: 2195

Like
0Likes
Like

Posted 15 September 2007 - 02:14 PM

Quote:

He stated clearly that he wanted to work in the industry. And he named areas like networking. I couldn't imagine doing that in an interpreted language exclusively.


Twisted

You need to let go of your prejudice and misconceptions about "interpreted languages". All they are is bytecode that is executed by a virtual machine instead of the actual machine. That's all. "Scripting" is an issue of definition that, in the end, is pointless. There's no actual difference. Python is a programming language, period. If anything, the fact that it doesn't need compilation is a pro for a beginner. There's nothing C++ can do than Python can't(the opposite is true in some cases, I can show you examples that take 8-10 lines of Python instead of thousands of lines in C++).

#34 Mercenarey   Banned   -  Reputation: 103

Like
0Likes
Like

Posted 15 September 2007 - 02:17 PM

Ok, it seems I wandered into a camp of Python zealots.

I can't see what this has to do with my initial recommendation. And I can't see that my recommendation is worse than yours.

#35 mikeman   Members   -  Reputation: 2195

Like
0Likes
Like

Posted 15 September 2007 - 02:23 PM

Quote:
Original post by Mercenarey
I can't see what this has to do with my initial recommendation. And I can't see that my recommendation is worse than yours.


Your initial recommendation is this:

Quote:

If your choice stands between C and C++, there is no doubt that you have to choose C++.


And I agree with it. However, if the choise is not limited between C and C++, I feel Python or C# are far better choises for a beginner. I'm far from a zealot, I've just worked with all those languages and can compare(Have you?). However, your recommendation is not 'worse'. It's not a race. We're just exchanging opinions here. You have the right to have yours, although you have failed to provide any real argument here: you just classify Python (which you admit that you don't know yourself) under the vague term 'scripting language' without explaining why that matters at all).

#36 Mercenarey   Banned   -  Reputation: 103

Like
0Likes
Like

Posted 15 September 2007 - 02:27 PM

It feels like a race, because I have had to defend against everyone here, and I even recieved minus points in the process.

You are advising a guy, who wishes to work in the industry and who wishes to do networking to use an interpreted language.

I will stick with C++. Lets just agree to disagree then.

#37 acddklr07   Members   -  Reputation: 145

Like
0Likes
Like

Posted 15 September 2007 - 02:28 PM

Hello,

First off, I can't believe the discussion got this heated, but I knew it was the moment the poster posted this topic. The two languages were C# and Python. Everyone fight about which language he should learn first, but I noticed that two languages get mention very quickly. I swear a mod. or an admin should just make a sticky about not posting this stuff and should redirect them to older topics before they do.

Well to the poster of this topic I say you should sit back and look at your skills. If you always challenged yourself in life than I can say as an opinion you can go to learn C++, but be advise it is hard to grasp some topics.(That is why I learned C++ first, but I know I am no were near a master. Hell I wouldn't even consider I am in the intermediate section either.) For example, pointers, abstract classes, derived classes(in a way), and some other topics. I do not know if C# or any other language have those topics since I only learned C++ and Visual Basic so far, but it can get hard at times in those topics.

I would actually advise you to just learn any language you want and just come here for help if you need it. That is what this community is for. Anyways you can always heed the advice that was given numerous times to you before, which was learn either C# or python (This IS a programming language, and not just a scripting language. I know a previous poster said that it was not a programming language, but it is. There is actually an article on GameDev.net website about someone who choose to try to make a game in a week and he used python for it.) as a beginner language.

Well I wish you much luck in your journey and if you EVER need help just come here and ask your questions, because there is people in this community who cares to answer them.

~Carl J. Loucius

#38 mikeman   Members   -  Reputation: 2195

Like
0Likes
Like

Posted 15 September 2007 - 02:28 PM

Quote:

You are advising a guy, who wishes to work in the industry and who wishes to do networking to use an interpreted language.


Yes, I am. I really don't see why not.

#39 cshowe   Members   -  Reputation: 360

Like
0Likes
Like

Posted 15 September 2007 - 02:29 PM

Quote:
Original post by Mercenarey
Ok, it seems I wandered into a camp of Python zealots.


No you've wandered into a forum where high level code is generally preferred to unnecessarily difficult languages like C and C++. The vast majority of beginners come to this forum with limited programming experiance and wanting to make a game. In general this forum tends to recommend using higher level languages that make learning to program easier so that the beginner can focus on learning the ins and outs of programming and writing games rather than irritating syntax and undefined behavior issues related to C++.

In particular this means that the forum tends to recommend python with pygame and C# with XNA. Both of these languages are much easier to write correct code in than C or C++ and in general will lead to a beginner being more sucessful at writing their game.

Quote:
Original post by Mercenarey
I can't see what this has to do with my initial recommendation. And I can't see that my recommendation is worse than yours.

Your initial recommendation of C++ is flawed for several reasons.


  1. C++ and C have largely undefined behavior in cases where code is incorrect. This makes it very difficult for a beginner to learn by experimentation. Reading outside an allocation or returning a pointer to a local variable are both incorrect, but tend to work "correctly" until they don't This means that a lot of beginners write code they think is correct and only starts breaking after they've written thousands of lines.

  2. You emphasize speed as an important reason to choose C++. Ignoring the fact that C++ is not necessarily faster than managed solutions (and is sometimes slower) this implies that beginners need to and are capable of writing high performance code. In general this isn't the case. Unless you make significant algorithmatic mistakes asteroids is going to run just fine on a modern computer regardless of whether it's being interpreted, compiled or anything else.





#40 Mercenarey   Banned   -  Reputation: 103

Like
0Likes
Like

Posted 15 September 2007 - 02:30 PM

You honestly believe a network programmer who only knows Python will get a job in the industry?

IMO only gameplay programmers at the highest level would get away with only knowing python.

Last words from me, cya around.




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