Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
C++ or Java?
Goto page 1, 2  Next
 
Post new topic   Reply to topic Printable version
 View previous topic  RAR-Archive Splitting? Post :: Post Check This out tell me if you like  View next topic  
Author Message
Assassin2684
Server Help Squatter


Age:34
Gender:Not sure
Joined: Jul 27 2004
Posts: 990
Location: Florida
Offline

PostPosted: Thu May 18, 2006 8:24 pm   Post maybe stupid    Post subject: C++ or Java? Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address
Hookerella79
Guest


Offline

PostPosted: Thu May 18, 2006 8:58 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Thu May 18, 2006 9:41 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Thu May 18, 2006 11:22 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Cerium
Server Help Squatter


Age:43
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Fri May 19, 2006 4:09 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

...

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
View users profile Send private message Add User to Ignore List AIM Address
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Fri May 19, 2006 8:00 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Fri May 19, 2006 9:10 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
SpecShip
Complete twat


Gender:Gender:Male
Joined: Dec 17 2005
Posts: 514
Location: 8025 - Spec Freq
Offline

PostPosted: Fri May 19, 2006 11:19 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Fri May 19, 2006 4:31 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Fri May 19, 2006 5:20 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Fri May 19, 2006 7:38 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Cerium
Server Help Squatter


Age:43
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Fri May 19, 2006 9:37 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address
SpecShip
Complete twat


Gender:Gender:Male
Joined: Dec 17 2005
Posts: 514
Location: 8025 - Spec Freq
Offline

PostPosted: Sat May 20, 2006 3:34 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Cerium wrote:
Im begining to wonder if blah-er is actually Qndre.


You actually had a doubt?
Back to top
View users profile Send private message Add User to Ignore List
Assassin2684
Server Help Squatter


Age:34
Gender:Not sure
Joined: Jul 27 2004
Posts: 990
Location: Florida
Offline

PostPosted: Sat May 20, 2006 9:15 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Sat May 20, 2006 9:23 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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:
Code: Show/Hide
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.
Code: Show/Hide
struct greeter {
  std::string greeting;
  greeter(const std::string& s) : greeting(s) {}
  void operator() (const std::string& greetee) {
    std::cout << greeting << ", " << greetee << "!\n";
  }
};
Code: Show/Hide
greeter x("Hello");
x("world");




Okay, just imagine C++'s <algorithm>, only without the headaches. For example, what would be in C++,
Code: Show/Hide
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:
Code: Show/Hide
// 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:
Code: Show/Hide
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:

Code: Show/Hide
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
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sat May 20, 2006 12:17 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

What makes those preprocessors you were talking about so much better than C's? What's wrong with
Code: Show/Hide
#define MYFOR(max) for(i = 0; i < max; i++)

or some variant?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
SpecShip
Complete twat


Gender:Gender:Male
Joined: Dec 17 2005
Posts: 514
Location: 8025 - Spec Freq
Offline

PostPosted: Sat May 20, 2006 3:17 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Hookerella79
Guest


Offline

PostPosted: Sat May 20, 2006 6:08 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

He's just a whiney lazy bitch. icon_smile.gif
Back to top
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sat May 20, 2006 8:45 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

The reason low-level languages like C don't have dynamic types is because of run-time speed. That is why they are so damn fast. There's no checking going on for every line of code, every expression. Yes, that's more dangerous when you have inferior coders, but it's a trade-off.

The reason for (i = 0; i < max; i++) is not hard-coded into C is because that is only one of the many ways to write it. The for statement can be used in any generic way you want:

Code: Show/Hide
for (;; i++)

Code: Show/Hide
for (i = 7;;)

Code: Show/Hide
for (; i < 22;)

Code: Show/Hide
for (a=3,b=12;c < 14 && d > 9; calc(), build(), e += 3)
Back to top
View users profile Send private message Add User to Ignore List
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sat May 20, 2006 8:51 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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. icon_confused.gif

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
View users profile Send private message Add User to Ignore List Send email
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Sat May 20, 2006 8:52 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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. icon_smile.gif

SpecShip wrote:
upper ring ... lower rings

What are these 'rings'?
Back to top
View users profile Send private message Add User to Ignore List
Cerium
Server Help Squatter


Age:43
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Sun May 21, 2006 10:38 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun May 21, 2006 10:51 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sun May 21, 2006 11:34 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Muskrat
Server Help Squatter


Age:38
Joined: Aug 24 2004
Posts: 829
Location: Swamp
Offline

PostPosted: Sun May 21, 2006 11:51 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 43 page(s) served in previous 5 minutes.

phpBB Created this page in 0.763004 seconds : 49 queries executed (74.0%): GZIP compression disabled