C++ Or Java?

Feb 14, 2013 at 11:34 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Jun 12, 2011
Location: 0x00000000 0xC00E0FF0 0xFFFFEFD4 0xC0000000
Posts: 108
Pronouns: he/him
Sumerian

Putting trolling aside...
liammillay said:
What's a dynamically typed language?
A language wherein an object has more flexibility over its data type than statically typed languages.

e.g. JavaScript, you can turn numeric constants as string literals and v.v.
 
Feb 14, 2013 at 2:16 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: Feb 13, 2013
Location: northville, MI
Posts: 2
Age: 27
Pronouns: he/him
Feb 15, 2013 at 12:08 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6225
Age: 39
Pronouns: he/him
Noxid said:
Dynamically typed languages are for people who are too lazy to plan and have no idea what they are doing
go home and turn yourself into a nice floral arrangement
What is all this hate for dynamic typing? Dynamic typing is flexible. You certainly don't have any nonsense like strict variable types in to and out of functions, have to write your own conversion functions between variable types because the language doesn't supply any, or get compile errors because you passed the sightly wrong flavour of int or char array to said function like C++ does. Or hey, the addition of waaay too many null variants like ASP.NET does when just one would have been fine when passing just one null type to a string input function would cause the damn thing to explode.[/RANT]

Then again I grew up with php and javascript so I may be a little biased.
 
Feb 15, 2013 at 12:21 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Dynamic typing leads to odd, sometimes unpredictable behaviour.
 
Feb 15, 2013 at 4:27 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Jun 12, 2011
Location: 0x00000000 0xC00E0FF0 0xFFFFEFD4 0xC0000000
Posts: 108
Pronouns: he/him
andwhyisit said:
What is all this hate for dynamic typing? Dynamic typing is flexible. You certainly don't have any nonsense like strict variable types in to and out of functions, have to write your own conversion functions between variable types because the language doesn't supply any, or get compile errors because you passed the sightly wrong flavour of int or char array to said function like C++ does. Or hey, the addition of waaay too many null variants like ASP.NET does when just one would have been fine when passing just one null type to a string input function would cause the damn thing to explode.[/RANT]

Then again I grew up with php and javascript so I may be a little biased.
omg php

hey C fellas, dynamic typing doesn't hurt.
 
Feb 15, 2013 at 6:25 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
Dynamic-typing has its place, sure. If you're writing a small script to generate a webpage, or do simple text and file processing, or operation on simple types and don't really care how it's represented. But that flexibility comes at a cost in the long run, of readability, maintainability, stability, and efficiency.
For a project as large as a game engine, a Dynamic Typed language is not the way to go, because the scope just gets too large and there may be interactions that span pages and pages of code and classes so keeping checks and balances on what type of data you're dealing with is good for your sanity. As well, the overhead of dynamic typing just makes me shudder.. seems really unnecessary for something like this when everything can be easily defined ahead of time.
If you're writing proper organized C++ code you don't /need/ to cast types all over the place, and if you really need to use the same function with different inputs then you could always just overload it.
As for casting between variable types I'm pretty sure for both C++ and Java the only time the cast is explicit is when there is possibility of a loss in information (downcasting) which makes sense because it is important to be aware of it since it could change your results. Casting between classes is something I almost never do.
I don't know about how ASP.NET handles NULL but in C++ and Java NULL there is one NULL and if you try to reference it you get an error because that is not allowed; NULL is not empty string and so I don't think it should be treated as such.

Errors are good. It lets you know what to fix.
 
Feb 18, 2013 at 9:47 AM
Veteran Member
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Aug 21, 2012
Location: At a computer
Posts: 337
How hard is learning C# compared to learning TSC?
EDIT:It appears the forum messed up and made a double post. delete one of these posts please.
 
Feb 18, 2013 at 10:09 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Jun 12, 2011
Location: 0x00000000 0xC00E0FF0 0xFFFFEFD4 0xC0000000
Posts: 108
Pronouns: he/him
How hard is learning C# compared to learning TSC?
OMG C# is waaaaaaay different than TSC and the two should not be compared.
 
Feb 18, 2013 at 11:29 AM
Veteran Member
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Aug 21, 2012
Location: At a computer
Posts: 337
otemoto-dansei-ningen said:
OMG C# is waaaaaaay different than TSC and the two should not be compared.
I wasn't comparing them.
Anyway's, it was pretty easy for me to learn TSC and know commands by heart, and i just want to know if C# would be really hard to learn compared to it.
 
Feb 18, 2013 at 5:06 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
liammillay said:
I wasn't comparing them.
Anyway's, it was pretty easy for me to learn TSC and know commands by heart, and i just want to know if C# would be really hard to learn compared to it.
1) Yes you were comparing them. Notice how you said "C# compared to learning TSC".

2) It will be quite a bit harder, but it should not be that hard.
 
Feb 19, 2013 at 12:20 AM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
Pronouns: she/her
It seems like this is a good topic for this.

Is there a resource library of some sort or something for C++ that allows for making games? I know that when I was trying to learn C# it didn't want to do anything game-related unless I used XNA which I never figured out how to install, so I was just wondering.
 
Feb 19, 2013 at 12:46 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
like I mentioned in my first post in this thread, Allegro is a good place to start. It's got basically everything you need to make a simple 2D game.
 
Feb 19, 2013 at 1:08 AM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
Pronouns: she/her
Oh sorry, I guessed I missed that. Thanks.
 
Feb 19, 2013 at 1:50 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6225
Age: 39
Pronouns: he/him
GIRakaCHEEZER said:
Dynamic typing leads to odd, sometimes unpredictable behaviour.
Nope. As long as you know the rules it is very predictable.
Noxid said:
I don't know about how ASP.NET handles NULL but in C++ and Java NULL there is one NULL and if you try to reference it you get an error because that is not allowed; NULL is not empty string and so I don't think it should be treated as such.
NULL is still NULL mind you. "if_null(NULL)" and "if_null('')" will always produce different results.
Noxid said:
if you really need to use the same function with different inputs then you could always just overload it.
That could work. Thanks.

While I'm here.. are there any good guides for creating simple windowed applications in C++?
 
Feb 22, 2013 at 4:00 PM
Senior Member
"Master using it, and you can have this!"
Join Date: Apr 15, 2012
Location: Tralfamadore
Posts: 74
Age: 28
Pronouns: he/him
Hello,
I just thought it might be helpfull if I compared the merits and flaws of java c++ and c#.

Java: A very easy too use language, java is one of the most common languages in game programming. While it is easy to use and debug, it is the slowest language listed here.

C++: This language is much faster than java. In fact it is one of the fastest languages out there. Its main problem lies in it not being something that I whould recommend to a beginner.

C#: while c# is about as easy as java, it has the added bonus of being faster. This is a language which, I believe, every beginning programmer should learn.

However these are all great languages and whichever you use, you will have a fine tool.
Thank you for listening to my (hopefully not flawed) review of these programming languages.
 
Feb 23, 2013 at 1:20 AM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
Pronouns: she/her
I'm pretty sure that's all been said before in the thread, but I guess it's a good point summary.
Personally I do not recommend C# for beginners, unless they don't have any experience in coding at all. I would just go straight to C++ because switching from C# to C++ might screw you up.
 
Mar 7, 2013 at 8:43 PM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Oct 29, 2012
Location: England
Posts: 178
Age: 26
Pronouns: he/him
Its main problem lies in it not being something that I whould recommend to a beginner.
It depends, many people have different preferences for me C++ was one of the first languages I started learning and it felt nicer and more comfortable to me compared to C# and other languages considered more beginner friendly. It all depends on the person and that is why I recommend when picking a first language to learn you should find all the languages that interest you and do each one for a week and see which one felt most comfortable and logical to you and then just learn that one and branch out from there. Worked for me and many other people I know.
 
Back
Top