 |
Server Help Community forums for Subgame, ASSS, and bots
|
Author |
Message |
Assassin2684 Server Help Squatter

Age:34 Gender: Joined: Jul 27 2004 Posts: 990 Location: Florida Offline
|
Posted: Thu May 18, 2006 8:24 pm Post maybe stupid Post subject: C++ or Java? |
 |
|
|
|
Hey, recently I have been hearing that Java is soon going to outbeat C++, in fastness and well... just plain easyer to learn yet keeping the power. Right now I personally think java is easyer because I have been working with it for a while. But anyways, what im really asking is is Java better or C++? I was origanally going to learn C++ but now im not so sure, because if java is easy to learn and is just as powerful as C++ I rather learn Java. Also I plan on making a game with one of the 2. So any help would be appriciated. |
|
Back to top |
|
 |
Hookerella79 Guest
Offline
|
Posted: Thu May 18, 2006 8:58 pm Post maybe stupid Post subject: |
 |
|
|
|
I prefer Java over C++, but if your going to make a big game and not something like tic-tac-toe, then go with C++. Get some things from both fields. Buinesses make software in Java. Even ATMs run on a special form of Java. Decide what field you want to go in if you want a career in programming.
Summary:
C++ = Game Design
Java = Buisness software |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Thu May 18, 2006 9:41 pm Post maybe stupid Post subject: |
 |
|
|
|
Java can never beat C/C++ in execution speed. Its benefit is being platform independant. When you do that, you necessarily give up speed. That being said, I've seen some pretty snappy Java apps, but they surely aren't doing a lot of data processing in the "Java layer". _________________ 4,691 irradiated haggis!
Last edited by Mr Ekted on Fri May 19, 2006 1:05 am, edited 1 time in total |
|
Back to top |
|
 |
SamHughes Server Help Squatter

Joined: Jun 30 2004 Posts: 251 Location: Greenwich Offline
|
Posted: Thu May 18, 2006 11:22 pm Post maybe stupid Post subject: |
 |
|
|
|
They're both crappy languages, and in that sense, picking them is like picking presidents. Anyway, Java was designed for average programmers, so if you want to become an average programmer (and you shouldn't), maybe that's the language to go with.
Fortunately, while you only get one choice for presidents, I don't see what is stopping you from learning multiple languages. They're not religions (except Ruby). |
|
Back to top |
|
 |
Cerium Server Help Squatter

Age:43 Gender: Joined: Mar 05 2005 Posts: 807 Location: I will stab you. Offline
|
Posted: Fri May 19, 2006 4:09 am Post maybe stupid Post subject: |
 |
|
|
|
...
Or perhaps Java was designed to be powerful for developing applications in RAD enviornments that will run on multiple platforms with minimal recoding. But hey, dont let me get in the way of your zealot-like opinion.
So, since youve 'nixed' two extremely popular languages that have possibly the largest user base (for lack of a better term); tell me, oh wizard, what you use when developing your uber-l33t appz. _________________ There are 7 user(s) ignoring me right now. |
|
Back to top |
|
 |
SamHughes Server Help Squatter

Joined: Jun 30 2004 Posts: 251 Location: Greenwich Offline
|
Posted: Fri May 19, 2006 8:00 am Post maybe stupid Post subject: |
 |
|
|
|
Hey, I'm just repeating the words of the guy who designed Java. What are you going to do, get all offended at me?
And I'm not a wizard. Whatever that is. |
|
Back to top |
|
 |
i88gerbils Oldbie Server Help

Gender: Joined: Dec 13 2002 Posts: 423 Location: OH Offline
|
Posted: Fri May 19, 2006 9:10 am Post maybe stupid Post subject: |
 |
|
|
|
So you're telling us you quoted someone and failed to give them credit in your post? That's bad form. Normally we use quotation marks and put the man's name or the source's name in paranntheses (or footnotes if you want to bother with subscript and chicago style). Also acceptable only in forum environments is to use the QUOTE block tags. _________________ Oldbie Server Help |
|
Back to top |
|
 |
SpecShip Complete twat

Gender: Joined: Dec 17 2005 Posts: 514 Location: 8025 - Spec Freq Offline
|
Posted: Fri May 19, 2006 11:19 am Post maybe stupid Post subject: |
 |
|
|
|
Assembly FTW?
I'm with C++ > Java. _________________ Replacing yazour untill the whore returns.
"I could run a ss server on my car stereo!" -Xalimar
"Liberta tuit ma ex infernis" -Event Horizon
"I know too much about nothing." - Mine GO BOOM
"Hmm anyway, back to my kingdom hearts." - Chambahs |
|
Back to top |
|
 |
(Deactived B l a h e r) BiLinux User I can take it both ways
Age:34 Gender: Joined: Mar 25 2005 Posts: 341 Location: East Sparta, Ohio Offline
|
Posted: Fri May 19, 2006 4:31 pm Post maybe stupid Post subject: |
 |
|
|
|
If you want to program for both windows and macintrash (I wouldn't see why you would, in the first place), I would go with java since it has a run time enviroment for most Operating sytems out there. But for over all power, a OO language, and managbility, I would choose C++ over Java.
Java was the first one built with .NET in mind, and then .NET came out and it was incoperated into C++ compilers, so there is really no need for Java, since VC++.NET has a little newer features. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Fri May 19, 2006 5:20 pm Post maybe stupid Post subject: |
 |
|
|
|
blah-er wrote: | Java was the first one built with .NET in mind |
You obviously still have no clue what you're talking about. _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him. |
|
Back to top |
|
 |
SamHughes Server Help Squatter

Joined: Jun 30 2004 Posts: 251 Location: Greenwich Offline
|
Posted: Fri May 19, 2006 7:38 pm Post maybe stupid Post subject: |
 |
|
|
|
i88gerbils wrote: | So you're telling us you quoted someone and failed to give them credit in your post? That's bad form. Normally we use quotation marks and put the man's name or the source's name in paranntheses (or footnotes if you want to bother with subscript and chicago style). Also acceptable only in forum environments is to use the QUOTE block tags. |
I did not say verbatim.
And FTR, Java and C++ are two of the best languages out there. (But they're still crappy.) |
|
Back to top |
|
 |
Cerium Server Help Squatter

Age:43 Gender: Joined: Mar 05 2005 Posts: 807 Location: I will stab you. Offline
|
Posted: Fri May 19, 2006 9:37 pm Post maybe stupid Post subject: |
 |
|
|
|
blah-er wrote: | If you want to program for both windows and macintrash (I wouldn't see why you would, in the first place), I would go with java since it has a run time enviroment for most Operating sytems out there. But for over all power, a OO language, and managbility, I would choose C++ over Java.
Java was the first one built with .NET in mind, and then .NET came out and it was incoperated into C++ compilers, so there is really no need for Java, since VC++.NET has a little newer features. |
What in the hell are you even talking about? Im seriously curious what goes on in that mind of yours to make you actually hit submit after typing that pile of shit. Do you actually believe what you wrote, or are you just trying to fit in? I dont understand why you -- or anyone -- types something so horribly inaccurate and thinks theyre actually being helpful.
<insert obligatory 'kill yourself' comment here>.
Edit:
Im begining to wonder if blah-er is actually Qndre.
SamHughes wrote: | I did not say verbatim.
And FTR, Java and C++ are two of the best languages out there. (But they're still crappy.) |
Stop skirting the goddamn issue and stop trying to talk down to everyone. If C++ and Java are terrible, than what is your definition of good? Stop being so fucking ambiguous.
Christ, you and blah-er are like polar opposites. Having both of you reply in the same topic should cause the server to explode; its a miracle that it hasnt happened yet. |
|
Back to top |
|
 |
SpecShip Complete twat

Gender: Joined: Dec 17 2005 Posts: 514 Location: 8025 - Spec Freq Offline
|
Posted: Sat May 20, 2006 3:34 am Post maybe stupid Post subject: |
 |
|
|
|
Cerium wrote: | Im begining to wonder if blah-er is actually Qndre. |
You actually had a doubt? |
|
Back to top |
|
 |
Assassin2684 Server Help Squatter

Age:34 Gender: Joined: Jul 27 2004 Posts: 990 Location: Florida Offline
|
Posted: Sat May 20, 2006 9:15 am Post maybe stupid Post subject: |
 |
|
|
|
Thanks guys, you helped me alot. I guess im going to go with C++ then. Im going to break out my old book this summer and start reading agin. |
|
Back to top |
|
 |
SamHughes Server Help Squatter

Joined: Jun 30 2004 Posts: 251 Location: Greenwich Offline
|
Posted: Sat May 20, 2006 9:23 am Post maybe stupid Post subject: |
 |
|
|
|
Okay okay! In these languages, you have to write the same things over and over again. How many times have you had to write "for (i = 0; i < n; ++i)"? And why can't you make a shortcut for that? Java does have a shortcut for that, in fact, but not C++. You're limited to the shortcuts that are built in to the language.
And I'm not talking down to anybody.
In some languages, like Scheme, or Lisp, you can make shortcuts for that. Since every program in Scheme is just a list of lists, it is straightforward to add these things. It's part of the language, and it's a way of doing things. (It's completely better than C's preprocessor.) For example, you could add the keyword 'for' to the language so that "(for i (range 0 5) ...do stuff...)" becomes valid syntax. (And "(for x (in some-vector) ...do stuff...)" would work too.) But Scheme has many of its own problems (in that it sucks, and everybody does everything differently).
So ok, there are some issues like having to write things out, but that's not so bad. But there are other things C++ and Java lack. Like the ability to make procedures, pass them between functions, and return them, catching all the variables in lexical scope. E.g. in Javascript:
function greeter(greeting) {
return function (name) {
print(greeting + ", " + name + "!\n")
}
}
var x = greeter("Greetings")
var y = greeter("Hello")
x("Earthlings")
y("world") |
Each procedure captures the variables defined in its lexical scope, so x's "greeting" is different than y's "greeting". C procedures, with static variables, are like singleton versions of what's here.
In C++, they call these 'objects', which are less flexible but good in many ways. struct greeter {
std::string greeting;
greeter(const std::string& s) : greeting(s) {}
void operator() (const std::string& greetee) {
std::cout << greeting << ", " << greetee << "!\n";
}
}; |
greeter x("Hello");
x("world"); |
Okay, just imagine C++'s <algorithm>, only without the headaches. For example, what would be in C++,
vector<int> foo;
...
vector<int> bar;
transform(foo.begin(), foo.end(), back_inserter(bar), some_function);
|
would look more like this if C++ borrowed from other languages:
// the type of foo is figured out implicitly
...
let bar = map(some_function, foo); |
Using a few of these things, especially map and for-each procedures, makes the code much more readable than nested for/while loops filled with declarations and assignments, and caters much more towards human thinking. C++ and Java are designed more around making it simple to compile. Which is useful and is why C++'s existence makes sense, since many times, well-organized low-level programming is needed. But Java doesn't make sense; it's basically (C++) + garbage collection + libraries + marketing - operator overloading, and still, all the code you write is tailored to the compiler, not to the way humans think. Java as in the language isn't very good; Java as in the JVM is good.
Right now, I'd say that Haskell is one of the best languages. It's a pretty weird language (the weirdest relatively well known language meant for practical use?). So I wouldn't be surprised if people disagreed with me. But, for example, it took about 35 minutes to write a program that finds all solutions of the n queens problem in C++, only 5 in Haskell.
If I wanted to write a program that printed the first 10000 prime numbers in Haskell, first I'd write a function, 'primes', that returns an infinite list of all the prime numbers (using the sieve of Eratosthenes). Then the main function takes the first 10000, converts them to strings, appends newlines, and prints them out: primes = filterComposites [2..]
where filterComposites (n:ns) = n : filterComposites (filter (indivisible n) ns)
indivisible n x = (0 /= x `mod` n)
main = mapM (putStr . (++ "\n") . show) (take 10000 primes) |
An infinite list is possible because Haskell uses lazy evaluation, meaning that expressions are only evaluated when their value is needed. Then, (putStr . (++ "\n") . show) returns a function that takes a number, and converts it into the outputting of that number (with a newline). (That's one way to think about it.) Then mapM combines those all into one IO () object.
Yes, this seems like a crazy way to think. (Because, well, it is a crazy way to think.) But it works and is surprisingly productive. More and more people are coming to this conclusion, and so the language has had an explosion of growth. (When you start near zero, everything is an explosion!)
What's above doesn't look very readable to somebody just looking at it, since, well, I didn't design it with that in mind. But it is readable to anybody who uses the language. (And it's as readable to you as std::cout << "Hello, world!" << std::endl; was the first time you saw that.) But this is because in the code above, there's no extra syntax, no variable declarations. Every single character there is either whitespace, an equals sign, a parenthesis, or part of the name of a function or datastructure. Just for another example, here's one other example, of how to define a factorial function, and then that greeter from before:
factorial 0 = 1
factorial n = n * factorial (n - 1)
greeter g gee = putStr (g ++ ", " ++ gee ++ "!\n")
programmerGreeter = greeter "Hello"
alienGreeter = greeter "Greetings" |
It doesn't get simpler than that. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
|
Back to top |
|
 |
SpecShip Complete twat

Gender: Joined: Dec 17 2005 Posts: 514 Location: 8025 - Spec Freq Offline
|
Posted: Sat May 20, 2006 3:17 pm Post maybe stupid Post subject: |
 |
|
|
|
So basically, his complaint being that upper ring program languages aren't user friendly enough like the lower rings to simplify things for him, like having macros?
Just create your own compiler or something then... :rolleyes: |
|
Back to top |
|
 |
Hookerella79 Guest
Offline
|
Posted: Sat May 20, 2006 6:08 pm Post maybe stupid Post subject: |
 |
|
|
|
He's just a whiney lazy bitch.  |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
|
Back to top |
|
 |
(Deactived B l a h e r) BiLinux User I can take it both ways
Age:34 Gender: Joined: Mar 25 2005 Posts: 341 Location: East Sparta, Ohio Offline
|
Posted: Sat May 20, 2006 8:51 pm Post maybe stupid Post subject: |
 |
|
|
|
Cerium wrote: |
Christ, you and blah-er are like polar opposites. Having both of you reply in the same topic should cause the server to explode; its a miracle that it hasn't happened yet. |
That's my main goal.
And what I said came out of my C++ and Java books, so I'm guessing it's wrong...
I think what I meant to say is that Java was the first of it's kind or something and it lead into the .NET framework, but that's just me.
And no I'm not quan, but he's my idle (just messing yo fools).
Last edited by (Deactived B l a h e r) on Sat May 20, 2006 9:01 pm, edited 2 times in total |
|
Back to top |
|
 |
SamHughes Server Help Squatter

Joined: Jun 30 2004 Posts: 251 Location: Greenwich Offline
|
Posted: Sat May 20, 2006 8:52 pm Post maybe stupid Post subject: |
 |
|
|
|
The macros in Lisp are better because they're like regular functions. They take an expression (a list) as an argument, and return another list (another expression), and this is done using Lisp code itself. You have complete freedom to rearrange expressions. C's preprocessor is mostly string-based pattern replacement, and run before the actual compilation pass. With Lisp-type macros, you could, for example, add object-orientedness to the language, completely mimicking the organization of C++. Depending on which variant of Lisp you're using, you could, for example, add Perl-style regular expression syntax to the language.
Hookeralla79 wrote: | He's just a whiney lazy bitch. |
I am probably whiney, but I don't see what is wrong with being lazy.
SpecShip wrote: | upper ring ... lower rings |
What are these 'rings'? |
|
Back to top |
|
 |
Cerium Server Help Squatter

Age:43 Gender: Joined: Mar 05 2005 Posts: 807 Location: I will stab you. Offline
|
Posted: Sun May 21, 2006 10:38 am Post maybe stupid Post subject: |
 |
|
|
|
blah-er wrote: | And what I said came out of my C++ and Java books |
No it didnt; shut up and die already, stupid.
Sam:
The others pretty much covered what I was going to say. I think youre expecting too much to be done for you without having to give something up. But hey, heres to dreaming... |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sun May 21, 2006 10:51 am Post maybe stupid Post subject: |
 |
|
|
|
So you're saying C's macros suck because they aren't functions. OK, how about a function? Or possibly an inline function? |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sun May 21, 2006 11:34 pm Post maybe stupid Post subject: |
 |
|
|
|
For the record:
1. Java can do some things faster than C++ because it's interpreted (if you find this hard to believe, think for a moment). For most practical applications running server side, a Java based program runs just as fast as a C++ based one, and can be developed much more quickly.
2. The rant about "for each" left out the fact that Java 5 has that functionality.
Also, People who like to skimp on typing by making something a macro are just asking for trouble. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Sun May 21, 2006 11:51 pm Post maybe stupid Post subject: |
 |
|
|
|
To me, using a macro would be primarily to help make the code readable.
I'd say that Java's main strength is being, as Brain said, much faster to develop programs under; a strength too often scoffed at. |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Software by php BB © php BB Group Server Load: 43 page(s) served in previous 5 minutes.
|