java or C++??

Tomi

Member
Jan 18, 2001
59
0
0
Hi all,

I learned both of them (I'm not xpert, but...). I prefer C++... especial the directX libraries!

And you??? What and why do you prefer?


CU
Tom
 

RabeaticSquirrel

Senior member
Apr 11, 2000
365
0
0
I'm in the process of learning OOP right now. I know as much about programming as my 2 year old son knows about molecular chemistry , but I'm trying. From what I'm reading, from an OOP approach, Java syntax is easier to learn. The Java virtual machine spereates you from the "machine" details that bog you down in C++ and allows you - the developer - to focus more on codeing. Whereas C++ is a more "firm" OOP principled language. By that I mean, it almost inherently forces you to write in an OOP fashion. But, as for syntax, I can't say. Haven't gotten that far yet. Just my 2c from my independant reading. Could be way off though...


Here's a couple of questions for you... What saturates industry more, OOP, procedural, or modular style? What language are games and the such (multimedia) primarily written in?
 

splice

Golden Member
Jun 6, 2001
1,275
0
0
I have no preference, Ada, VB, C/C++, Java, ASM, etc... If I need speed or need to to manipulate data close to the hardware, C/C++ is the best. If I need cross platform capability and a very secure program, Java is the way to go. It really depends on the application you intend to develop.
 

Tomi

Member
Jan 18, 2001
59
0
0
guess 95% of all games (comercial) are written in C/C++ with the library of directX (current Version: 8.0a).
Some older games are coded in Glide and DirectX. Glide is a multiplatform library... it means, that linux (and other) supports glide.
But in the last years, MS pushed directX... every 6Month a new release!


Back to the topic:
Wouldn't you say, that all you can do in JAVA you can do it in C++ too?
 

MrWhiteUK

Senior member
May 13, 2001
625
0
0


<< Whereas C++ is a more "firm" OOP principled language. By that I mean, it almost inherently forces you to write in an OOP fashion. >>


C++ is not proper OOP, Java is, you have this backwards. Java practically forces you to write OOP. Thats what I love about it, code is very neat, there are no memory pointers (not that you have to worry about anyway)

I think Java teaches you to write better code than the Miscrosoft languages.
 

Scootin159

Diamond Member
Apr 17, 2001
3,650
0
76


<<

<< Whereas C++ is a more "firm" OOP principled language. By that I mean, it almost inherently forces you to write in an OOP fashion. >>


C++ is not proper OOP, Java is, you have this backwards. Java practically forces you to write OOP. Thats what I love about it, code is very neat, there are no memory pointers (not that you have to worry about anyway)

I think Java teaches you to write better code than the Miscrosoft languages.
>>



I agree, that's why I use Java for my Comp. Sci. I class.
 

RabeaticSquirrel

Senior member
Apr 11, 2000
365
0
0
What about the theory of programming? How would you suggest a "newbie" take that on? A novice programmer, who happens to be a fellow co-worker pointed me to this book. However, he reads a book, and immediately considers himself an expert on the subject. Therefore, I'm cautious to act on his word alone. Do any of you gents have a suggestion? I'm having a very hard time learning OOP directly. From what I'm beginning to see, it would be more logical to learn OOP through the syntax of a particular language, such as Java or C++.

Specifically what I mean by the theory of programming is: pointers, integers, array's, what they mean when they refer to the data, etc... From my view on computers, speaking as a communications project manager - rather than a developer - I see things from a user standpoint. Therefore, when they say "data", I think of things like, word documents and txt files, the physical representation of the term. Am I making sense? Plus I have no idea what an array would be used for, or how you would use an array to program a FIFO interface etc... I'm at a loss for more of a description. Can any of you provide some "educated/logical" guidance <--- not sure if I should couple those together for you developers out there . Thanks in advance for any assistance...


One last thing...what is the difference between Java and Java2?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It depends on what you're doing, perl rocks for string manipulation, CGI and cross-platform scripting but I wouldn't use it for a web server or a game.

Really the language isn't all that important, as long as you have a decent understanding of programming you can learn a new language's syntax fairly easily.

Glide is a multiplatform library... it means, that linux (and other) supports glide

As is OpenGL, which is why every game from iD uses OpenGL and runs on Linux right a way.

But in the last years, MS pushed directX... every 6Month a new release!

Rapid releases aren't always a good thing, hell OpenGL hasn't had a major update in many years but it's still the standard in many areas because it was designed well from the start.

Isn't C# supposed to remove this debate?

No, I would say it's MS wanting to use Java but can't because it would be an ego hit and with the lawsuit they lost to Sun they can't include any version of Java with their OS except an outdated Sun copy.

 

thornc

Golden Member
Nov 29, 2000
1,011
0
0
RabeaticSquirrel

Read something like these for general programming( ok ok focused on C/C++):
The practice of Programming
Programming Pearls

For data structures and algorithms, I don't have a formed mind yet but
"Data Strutures and Program Design" is good but I don't recall the author or the publisher!

And a good C++ with an introduction on OOP is:
Thinking in C++
You can download it for FREE at: Bruce's Site!


As for the topic:
Well I still prefer C++, because of my procedural background. But I understand that
Java is a full OOP programming language
 

MustPost

Golden Member
May 30, 2001
1,923
0
0
<<As is OpenGL, which is why every game from iD uses OpenGL and runs on Linux right a way.>>

as far as I know every id game that the source code has been released for has used imbedded assembly with C. Actually its only Doom and Quake that ive seen, and I forget if it was QuakeGL or not. But I think even the GL version used assembly.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
as far as I know every id game that the source code has been released for has used imbedded assembly with C. Actually its only Doom and Quake that ive seen, and I forget if it was QuakeGL or not. But I think even the GL version used assembly.

Did someone say they didn't? Inline assembly is very common in C/C++ source, there's somethings that a compiler just isn't made to optimize 100% and that's even more true considering that Doom and Quake1 were made for SVGA cards on P100s.
 

MustPost

Golden Member
May 30, 2001
1,923
0
0
<<Did someone say they didn't? Inline assembly is very common in C/C++ source, there's somethings that a compiler just isn't made to optimize 100% and that's even more true considering that Doom and Quake1 were made for SVGA cards on P100s. >>

This was really aiming for the statement that id games have been immidiatly portable. Depending on how it was written, assembly, wouldn't always be portable, even from windows to linux.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
This was really aiming for the statement that id games have been immidiatly portable. Depending on how it was written, assembly, wouldn't always be portable, even from windows to linux.

Assembly is portable from Linux to Windows, it's only processor specific. Infact iD developed all their games since quake 1 on Linux and then ported to Windows, IIRC.
 

m0ti

Senior member
Jul 6, 2001
975
0
0
Personally, I prefer Java over C++. It is easier to write correct, clean code, and it's standard. And the documentation is top-notch, regardless of platform or IDE (personally, I've been using EMACS on a linux box for the last two months for everything except the GUI, and I love it).

In general, though, it doesn't really matter. You have to become familiar in programming a certain way, whether structured, OO, or whatever (thinking along the lines of LISP, here. Yeah I know it's got OO as well, but it's more like recursive list programming or something like that). Once you are comfortable with a certain paradigm the language doesn't really matter. You might not be an expert in another language, but you can be productive in about half a day.
 

m0ti

Senior member
Jul 6, 2001
975
0
0
Oh yeah, you can make OpenGL games in Java too (with JavaGL). There's even been a couple of commercial games made this way (can't quite remember their names).
 

splice

Golden Member
Jun 6, 2001
1,275
0
0


<< I hate java, its slow and you cant overload operators!! >>



Bahahhaha funny...now those are some good reasons to hate a language.
 

bevancoleman

Golden Member
Jun 24, 2001
1,080
0
0


<<
Glide is a multiplatform library... it means, that linux (and other) supports glide

As is OpenGL, which is why every game from iD uses OpenGL and runs on Linux right a way.
>>



Glide multiplatform, haa. Yes it is so long you use 3dfx hardware. I hardly consider that multiplatform.




<<
But in the last years, MS pushed directX... every 6Month a new release!

Rapid releases aren't always a good thing, hell OpenGL hasn't had a major update in many years but it's still the standard in many areas because it was designed well from the start.
>>



OpenGL has been updated as often as DirectX, it's just not as easy to see. OpenGL supports extentions to the main core API, and most video card manufacturers have been pumping them out as fast as they can. However I do agree that OpenGL is a very good gfx libary, about the only one that is truly hardware inderpendent.



<< Isn't C# supposed to remove this debate?

No, I would say it's MS wanting to use Java but can't because it would be an ego hit and with the lawsuit they lost to Sun they can't include any version of Java with their OS except an outdated Sun copy.
>>



It would be more correct to say that Java is very simular to C, and C# is an object orintated version of C (hence now looks like Java). However what is simular is the libaries that are used by C# and the .NET set of languages, though I spose there are only so many ways to orginise OO.


Scootin159


<< << Which one is a bigger resource hog? >>

My guess is C++ would be faster
>>



C++ is faster and takes less resources than Java by a league. We got a java server at work which we are developing for and the damn thing is taking over 200Mb of ram and it an't even doing anything yet. Hate to see what it looks like when under load.

On the positive side of java, it is great for strict OO coding, and the VM protects the machine it's running on from bad code.
 

Adrian Tung

Golden Member
Oct 10, 1999
1,370
1
0


<< I hate java, its slow and you cant overload operators!! >>


You forgot to mention one more important thing - pointers. I don't like to use languages that try to hide things and take control away from the programmer.


atwl
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Glide multiplatform, haa. Yes it is so long you use 3dfx hardware. I hardly consider that multiplatform.

Well since it ran in Windows, Linux and MacOS I would say it's multiplatform. Whether or not you need a certain piece of hardware is irrelevant.

OpenGL has been updated as often as DirectX, it's just not as easy to see. OpenGL supports extentions to the main core API, and most video card manufacturers have been pumping them out as fast as they can.

OpenGL itself hasn't been updated, the reason it supports extensions is so that the core API doesn't have to change often.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |