Seriously though, you gotta be into S&M if you decide to develop something in Java yourself and you'll be doing part of the job.
Name:
Anonymous2005-08-12 15:49
What I hated most is when 1st year programming is now all using Java because its simpler to the newbies.
Java was great on paper. A language that was OS independent. Of course Sun left out the fact is ran damn slow. Azerus is java coded and that runs slow as hell. I can see Java running on website application but full-fledged OS programs??
Name:
Anonymous2005-08-12 16:04
>>2
Wow everything you just said is the opposite of the truth.
It's certainly not easier to noobs; maybe it is if you're just printing hello world (although I can think of a dozen languages where this is simpler), but try getting them to interact with the API knowing what they do.
Name:
Anonymous2005-08-12 21:55
>>5 isn't 'hello world' in php simply...
hello world
All the interaction with API is nessacry though in order to properly follow the OOP approach.
My gripe with Java is just the utter slowness. Yes it goes though an interpreter (hence why its OS independent) but its been so many years Sun should have tried to improve it.
>>8
More like Java has a really fagged up approach (and the library sucks).
Name:
Anonymous2005-08-13 0:50
>>7 My point being, that would be n00b-level simplicity. >>9 thanks
Name:
Anonymous2005-08-13 5:47
The problem with Java has nothing to do with any technical issues. It's faster than a good many languages since it is compiled to bytecode rather than just read from a script.
The problem is it's a poorly designed language that's no fun to program in. It claims to be an object oriented language but it's possibly the worst example of OO I've seen. Well C++ isn't too good at it either. It has a primitive type system that is incompatible with the object system. Wanna use ==? Go ahead and use it on your ints, but it's practically useless on your strings. Ditto switch/case. Wanna define new operators for your classes? Sorry. Want polymorphism? You can have it, but get ready for lots of disgusting type casts!
Java is pretty much singlehandedly responsible for giving OO a bad name. Try something like Ruby or Smalltalk if you don't believe me.
Name:
Anonymous2005-08-13 7:35
the irony is that Java was originally designed for performance
Name:
Anonymous2005-08-13 7:40
>>13
It was designed as an embedded language for set-top boxen.
Name:
Anonymous2005-08-13 8:54
>>6
PHP would be a better language to learn; it's indeed simpler, although for console applications only; you don't want to confuse newbs with web-related stuff when they barely understand how a computer works.
>>8
The API is overgeneralized. You don't have to define the frigging Universe and descend from it; too much generalization translates to unproductive, slow, harder to read, boring ass coding.
One of the reasons why Java is slow is its pitiful API design. One of Java's (massively retarded) premises is that it won't modify objects like String, but rather, it'll destroy them and create a new one upon operations. That's why, when you benchmark Java doing, say, integers, it's pretty decent, and you may even say it's just some 30% slower than C; but when you want to do anything serious and will for example manipulate text, it becomes painfully slow, slower than PHP, Perl, etc.: if you use Strings, you're doing it wrong, and you'll see string operations like concatenation are O(n+m) or worse. To do it properly, you should know the API perfectly, which takes further time and suffering, as you'll see you'll have to use all sorts of streams and other crap just to get around this shitty design, making your program an absolutely blOOated hell that's both unproductive and hard to maintain.
The bottom line is, stay away from Java.
>>9
That's if you enter PHP; but "hello world" in a file gone through PHP will just print "hello world".
>>12
Exactly. At least, C++ has some of what Java lacks. I like C++ not because it's a perfect OO implementation, but because it covers two paradigms - OO C++ and structured C++--, which suits most problems best as you have to solve different problems, some which are inherently OO and some that are inherently non-OO, and this is where fully OO languages fail.
>>14
But its standard API today looks anything but ready for that.
Name:
Anonymous2005-08-13 10:20
>> One of Java's (massively retarded) premises is that it won't modify objects like String, but rather, it'll destroy them and create a new one upon operations.
Actually no. It only looks that way from the programmer's perspective, but behind the scenes Strings are managed with a factory class. This is a Good Thing. Compare this to C strings: because C strings are null terminated instead of knowing their own length, repeated concatenations become quadratic because you have to keep searching for the null char at the end of an increasingly large string.
In conclusion, your comments are based on ignorance, a trait I have come to expect from people who use stupid words like "blOOat". Java has enough lossage without needing to make shit up.
Name:
Anonymous2005-08-13 13:36
>>16
Ooooh, I'm sorry Doctor Anonymous, I can't compare to your knowledge. Knowing Java's shitty string library is that shitty because it's implemented with an uppercase good thing makes it worth being slow.
Nevermind I could use one of the hundred string libraries freely available for C, which offer O(1) or similar complexity for most operations; or Perl strings, which are also inherently better than your Good Thing. But disregard this, Factory Classes are so Goth they Shit Bats.
BTW, it's lame to be using the standard library strings in C. What's your experience with the language, Doctor Anonymous?
Name:
Anonymous2005-08-13 14:18
>>17
Raving sarcasm is cruise control for proving you're not an ignoramus.
Name:
Anonymous2005-08-13 14:47
>>18
Raving sarcasm is cruise control for proving you're not a troll.
Name:
Anonymous2005-08-13 16:16
>>17 how many of those libraries are free to distribute and cross-platform? (serious question here, I honestly don't know).
Name:
Anonymous2005-08-13 18:23
>>1
You hate Java? Don't use it! Why waste your time anyway? I used to hate Perl but I learned it and I use it now to replace all my bash shell scripts and it's a great language for system administration.
Same thing for Java. I know professionals (real guys, not me) who use Java for embedded systems and they say it's a great language. I trust them.
What features would a portable language need to be superior to Java? For example, a language ideal for complex gaming on public computers.
Name:
Anonymous2005-08-17 19:06
>>24
Besides how poor the language is, the whole platform is a bad idea. A strictly standard, comprehensive library, together with a strict standard, comprehensive language that's recompiled for your platform in either developer side or, through a high-level intermediate language, in the client's side, would be better.
>>26
That's the spirit. C++-- minus parts of the standard library plus one of these C garbage collectors, a collection of handy defines, PCRE, ICU, SDL, and some higher level libraries for business stuff, GUIs, and other wankery wins. It's just as portable as Java, only dozens of times faster. It'd need some work if we want to get that transparently compiled from intermediate language in the client, but it'd be a much better, simpler, faster platform than Java.
Name:
Anonymous2005-08-18 11:50
Personally I prefer --C++ because it looks more balanced.
Name:
Anonymous2005-08-20 8:10
>>28
But that's strip it down then expand it; It's more logical to have ++C--, which first upgrades it to C++, then removes what you don't need or like.
Name:
Anonymous2005-08-20 9:13
>>29
I'm aware of that but there's no such language as C--. I like to think of it as having implicit parentheses to defy the natural precedence, like so: --(C++)
Hmm, I don't know what to make of this. I'm actually trying to learn Java at the moment. Don't scream at me and tell me not to, I HAVE to for a university project.
It doesn't seem like such a bad language so far, a bit anal, I must admit, but nowhere near as painful as people make it out to be.
Although I must admit, it is a bitch to get up and running.
Name:
Anonymous2005-08-23 10:50
>>33
University projects usually make it as if it weren't as terrible, but the second you have to deal with the shitload of classes the standard API is, you'll see.
Name:
Anonymous2005-08-23 11:35
>>33
It starts off not-so-bad but then when you want to do multiple inheritance, you lose, when you want your primitives to behave as objects, you lose, when you want to pass functions as values, you lose.
I spent 3 years at uni doing almost nothing but Java, and by the end I honestly believed I no longer enjoyed programming. Then I took up Lisp and realised it was just Java I don't enjoy.
And yeah the standard library is a bit of a monster.
Name:
Anonymous2005-08-23 19:54
standard library is a bit of a monster
And the award for understatement of the year goes to...!
Name:
Anonymous2005-08-27 21:07
I'm with you! The standard lib sucks and static typing is yyucky!!
Name:
Anonymous2005-08-28 6:24
>>37
So use Scheme. It's dynamically typed and has practically no standard library to speak of.
Name:
Anonymous2005-08-28 8:58
>>38
Actually I've already got a fave language – Ruby. It's fast enough for everything I do and feels so incredibly natural to me.
Name:
Anonymous2005-08-28 9:05
>>39
Ruby is awesome. My favourite Ruby hack: class Integer
def d sides
result = 0
self.times do
result += 1 + (sides * rand).to_i
end
result
end
end
Guess what it's useful for :)
Name:
Anonymous2005-08-28 10:58
The Ruby language is ok but I hate the Ruby community. Their perl bashing is especially irritating.
Name:
Anonymous2005-08-28 13:59
They bash perl? Perl is one of the largest influences on the design of Ruby, along with Lisp and Smalltalk.
Name:
Anonymous2005-08-28 15:47
>>42
Yes they do. Their mailing lists are filled with low attacks. Also they are trying to move away from perl apparently. They actually want to deprecate the range operator that perl has. ie: if(/start/../end/) { etc etc }
I can understand wanting to make it more orderly and whatnot but throwing away perfectly good things just because it came from perl is so retarded.
Name:
Anonymous2005-08-28 15:49
I rather people bash ASP than anything else.
Name:
Anonymous2005-08-28 16:11
I find using ranges in if expressions is confusing. I don't understand it anyway.
Name:
Anonymous2005-08-28 18:30
>>45
let us not allow anyone else to use something because i am too much of a retard to understand it
Name:
Anonymous2005-08-28 20:48
>>41
Lol, then again the Perl community bashes PHP.
What the fuck were you doing to mess that shit up?
Name:
Anonymous2005-08-29 13:08
>>51
Um, you can't pass functions in Java. That's the trouble.
Name:
Anonymous2005-08-29 17:44
>>52
That's what happens when using shitty languages. Sorting was a mess, I believe I had to write an entire new class implementing an interface with several functions to fucking sort an array, I was so pissed at it I ended up writing a small quick sort function straight from my memory for the array I needed to sort. Shit sux man.
Name:
Anonymous2005-08-29 19:05
>>50
Not really. If it's in range, true. If it's not in range, false.
Name:
Anonymous2005-08-30 6:00
>>41 >>43
Python seems to have a similar issue with Lisp. Guido seems bent on assassinating the power of the language by removing anything Lispy that seems to have crept in - when they were only put in there in the first place to attract lispers to get a good user base for Python.
>>59
but it's public, static AND void so you've no right to complain
Name:
TokenMacGuy2005-09-15 20:15
The main power of interned strings (and other such objects) is the pointer compare. if two immutable objects have the same pointer, then they have the same value as well; and by interning them, if they have unequal pointers, then the objects must also have unequal values.
This solves a common type of computing problem, but not all. Typically, processing the input of a large stream of text involves moving in and around a buffer, which you write to often, resize infrequently, and would never compare to another unit of text as a whole. Interning this buffer is a massive waste of memory and computation.
Java has a bit of a nice compromise, as far as strings are concerned, having both interned strings, (String and its descendants) as well as mutables (Buffer, and its descendants). Problem is, they are mutually incomprehensible. Most of the operations that involve processing text work on strings, but not on buffers. there is no suitable class adaptor since these methods assume that their arguments ARE immutable strings. No part of the Java language or API treat strings and buffers uniformly. The operations available to buffers are, at best, minimal, but more realistically, are broken. Working with buffers is still faced with interning and then collecting a large number of single-use, immutable strings.
Objective-C has a very similar API design to Java, with most of the same features in the Foundation.framework, but with one major difference. All structures are implemented both mutable and immutable, with immutables automatically interned (where appropriate), and all operations on those structures work in the expected fashion weather the object is mutable or immutable. It even has a built-in localization mechanism which is minimally invasive to the programmer. Objective-C's only boner is its garbage collection, or lack there of; reference counting is broken in Obj-C, since reference counting doesn't work period. Wish they'd switch to boehmGC or some other sensible mark and sweep. I am very fond of obj-c
Name:
Anonymous2005-09-16 4:14
>>61
Immutable strings: 10% of my stuff
Mutable strings: 90% of my stuff
Mutable strings: superset of immutable functionality, in theory, and may be computationally as efficient if you use stuff like reference counters and write on change. Immutable strings thus look absolutely useless to me.
Java immutable and mutable functions are incomprehensible. And what's worse, the good ones are only available for the useless strings. Furthermore, the buffer functions suck ass and you end up converting to crappy strings.
I believe the technical term for this situation is "shitty API".
Name:
Anonymous2005-09-16 6:57
It would be nice if there were a String interface that you could implement. Or if you could add things to classes after definition; that's a really powerful tool.
Name:
Anonymous2005-09-17 13:13
Obj-C has a half-finished garbage collector, which should hopefully be actually finished in 10.5.
Name:
Ahika2005-09-18 0:10
There's nothing wrong with Java. If you want raw speed and low level functionality then fine, go use C. Java provides well structured OOP functionality and a wealth of base-classes to aid the programmer (try coding networking in C). Hell, these days with the JIT compiler (correct, I said compiler, not interpreter) Java byte-code runs natively on your OS. The things that make Java seem slow are AWT and Swing. These provide the programmer with easy front-ends, and quicker program production while as a drawback require a lot of resources from the native classes. When you say Java is slow, most of the time you're referring to the front-end.
Anyone want to discuss writing games in Java? With native LWJGL back-end, Java OpenGL functionality and speed is directly comparable with a game written in C++. No Swing or AWT to bog the application down. Just a few seconds longer to load while the byte-code is compiled by the JIT compiler, then you get your C++ performance from Java.
Name:
Anonymous2005-09-18 8:33
THAT MUST BE WHY SO MANY GAMES ARE WRITTEN IN JAVA!
IS JAVA READY FOR DOOM 3? I DON'T THINK SO!
Name:
Anonymous2005-09-18 9:08
>>65
It's not the speed, or lackthereof that I dislike. Frankly I think everyone who says "zoomj java is slow!" is missing the point - like you said, if you honestly need speed then use C. If, as in the majority of cases, you don't, use a higher level language.
No, my problem is that it makes you jump through so many hoops just to get anything done. If I'm gonna use a high level language I'll use Ruby or Lisp or something that gets the fuck out of my way. If I need speed I'll prototype it in a high level language and then translate it into C++ or something.
I also think you're full of shit btw: The things that make Java seem slow are AWT and Swing.
Newsflash: AWT and Swing are just Java's toolkits. If you're writing a GUI app in any language you're gonna be using a toolkit whether it's Tk (ew) or QT or GTK or win32 (ew). Java OpenGL functionality and speed is directly comparable with a game written in C++.
And again if you're writing an OpenGL game in any language you're going to get the performance of OpenGL whenever you make a call to it; any speed penalties will come from the overhead of writing the rest of your game in $YourFavLang - physics engines, logic etc.
Name:
Anonymous2005-09-18 9:37
Java OpenGL... speed is directly comparable with a game written in C++
Having written an OpenGL game in Java, I can honestly say that's the most batshit crazy claim I've seen this week. You'd have to really fuck things up in C++.
Oh, cool, the card is still performing just as fast as always, but your game logic isn't fast enough to take advantage of that.
Name:
Anonymous2005-09-18 9:38
Well, most games spend the majority of their time in the draw-loop. Any overhead incurred by the AI/networking is minimal.
Its like coding in C and ASM. If you code a whole game in ASM, its fast. If you code a game in C, but use ASM for the graphics code, its still fast. You only take like 2% speed hit for your sins. Its not quite the same with java, but the speed hit you take for using java with openGL API is still minimal.
Name:
Anonymous2005-09-18 10:06
Just some examples. cya
Fast C code is generally slow Java code today
(assuming modern JITs).
C is fastest doing everything through array refernces. In Java non-linear array referenes are expensive. C is slow generally at recursion, Java recursion can be blindingly fast. (Faster then a local array based stack in fact.)
Memory allocation in most C compilers is dirt slow. Memory allocation in Java is highly highly optimized.
you are either batshit insane or a troll, or both.
Name:
Anonymous2005-09-18 11:50
Fast C code is generally slow Java code today
I don't know what this sentence means. Someone please parse it for me.
Memory allocation in most C compilers is dirt slow. Memory allocation in Java is highly highly optimized.
The compiler doesn't allocate memory since, you know, it's something that happens at runtime. The OS does it.
Name:
Anonymous2005-09-18 11:56
oh noes :( java is slow. sun should just give up. Seems very few people in this thread can see any positive side to using java. Java has a lot of uses in the software industry. If its too slow for your liking, or you dont like the overhead, then no-one is forcing you to use it. Go use assembly language if that does the job to your satisfaction. Program your shit in raw binary if that floats your boat. But if Java does what you need, why avoid it?
Name:
Anonymous2005-09-18 12:04
also, I assume the reason you dont see games released in Java is that most developers rely on a custom version of the JRE. And I'm pretty sure Sun will not let them distribute a custom JRE.
Name:
Anonymous2005-09-18 12:05
Anyone who makes games know you minimize calling malloc()/free().
Indeed, we just use static arrays. Who the fuck would ever build more than 128 units in my RTS anyway?
Name:
Anonymous2005-09-18 12:20
>>69 Its not quite the same with java, but the speed hit you take for using java with openGL API is still minimal.
Speaking from personal experience: no, it's not. Even something like preparing a scenegraph in Java is a whole lot slower than I'd like.
Well, most games spend the majority of their time in the draw-loop.
Nice oversimplification there. Excluding sound, networking, AI, physics, etc, etc, etc, what you're left with is still going to underperform.
I suppose you could develop and call external libraries, but what's the point? You've lost portability, and Java isn't exactly a hot glue language.
Java just isn't meant for making high-performance games. Strategy games with simple AI? Sure. Adventure games? No problem. 2D RPG? So/so, but it's workable. Anything with 3D or a heavy AI? Forget it. Java's strengths lie elsewhere.
Name:
Anonymous2005-09-18 12:30
>>76
I hope you're yanking my chain. Static arrays are a good idea.
For situations where they're not flexible enough, you use an ADT (that also minimizes malloc/free). The key point is that memory allocation is dog slow, so you want to do everything in your power to avoid it, particularly in inner loops.
As for the guy who claims Java's fast with recursion, big deal. Tail-call elimination isn't exactly voodoo.
Name:
Anonymous2005-09-18 12:42
>>73
As I've said a number of times in this thread it's not the slowness that's the problem, it's the fact that it's a shit language that's a hassel to code in. If I'm going to take a speed penalty - and don't get me wrong, I'm happy to do that, most of the stuff I write doesn't need to be --omg-optimized - I'd rather use a language that's fun and doesn't take incredible amounts of code to do simple things.
True though everyone seems to be jumping on the "Java is slow" boat, which entirely misses the point.
Name:
Anonymous2005-09-18 17:13
>>79
Exactly. We all know Java is slow, with or without Swing/AWT, and Perl is even slower I guess. For what I'm using it, I don't care.
The reason why this thread exists is that this "well structured OOP functionality" is really a very shitty API, it's made of inheritance and mess. Even though you're given a lot of functionality, the API is so fucked up you have to instantiate your grandma (who inherits from OldRelative, Relative, People, Stuff, Entities, Matter, and Universe). Since you have to call methods from who knows what godforsaken, abstract, absolutely useless, stupid great-grandparent class (hey, we need this generalization, think families with several grandmas or other kinds of families where your grandmas are imps with large penises), so you have to fight your way through the unholy, messy spaghetti the APIs are; you can't possibly memorize all that bullshit and end up being very unproductive (a well known OO problem); and you end up writing several lines of code to do it, beating the original purpose of having libraries to do stuff.
Name:
Anonymous2005-09-18 18:02
Java is awesome, you idiots just don't know how to use it properly.
Name:
Anonymous2005-09-18 20:51
Java's memory handling is slower than C's necessarily since you can't put things on the stack. It's possible to have some sort of garbage collection in a C game, but the best way to do it is a dedicated pool that is completely thrown away every so often. Pausing for a mark/sweep is completely out of the question if you need to keep framerates up.
(Some people may want to point out that some Playstation company whose name I don't remember used Lisp, but it actually used a variant with no garbage collection)
Name:
Anonymous2005-09-18 23:29
EVERYTHING IN JAVA IS ON A STACK YOU DUMB NUB
Name:
Anonymous2005-09-19 8:42
I've still not seen anyone use java "properly". Show me a good use of java and you've won!
Name:
Anonymous2005-09-19 9:10
It's not the speed (this isn't the 1.0/1.1 era anymore). It's not the memory consumption (it's poor, but life goes on). It's not the startup time (you don't use java for clients anyway). It's not the syntax (damn similar to C anyway). It's not the language model (for industrial computing it ain't half bad). No, sir, it's the java libraries I can't stand.
Damn, they're ugly. They even make C's crap libs look divine.
Name:
Anonymous2005-09-19 11:15
if everything on java is a stack, shouldn't reference counting be enough?
You guys should go work for Sun. Your fanboyism obviously outstrips the knowledge of a billion dollar company.
Name:
Anonymous2005-09-19 20:47
If I designed the Java API, it'd have 10% as many symbols, yet retain all the functionality. And I'm sure it could be done better.
Name:
Anonymous2005-09-19 22:12
Ok good luck.
Name:
Anonymous2005-09-19 23:10
The Java API is a prime example of overengineering. It's also one of the most verbose POS I've ever seen.
KISS.
Name:
Anonymous2005-09-20 7:12
>>90
The restrictions of the core language would make that quite hard. It's just not very powerful. You could probably accomplish your goal in a language like Lisp or Ruby or whatever.
Name:
Anonymous2005-09-20 7:18
>>93
Oh. Come to think of it, yes, it'd become too annoying. Let's just dump Java.
Java is awesome if you are a 4chan poster because then other people can use your code. If you used another language it wouldn't be so clean and understandable because you guys are fucking fags and suck so hard at programming.
Name:
Anonymous2005-10-05 19:19
why would it be public static void main. what if it wants to return an error status. what THEN!?!?1/1//
Fuck this letter. This is the shittiest character in the world. People who open their posts with it deserve to die.
This horrible letter doesn't merely mean that the post is devoid of any form of kality, it also means that your post is actively trying to skuander my precious time.
Every language can rock given the right problem to solve.
Every language can suck when applied to the wrong problem.
Name:
Anonymous2009-05-09 16:10
lol Java sux no one would ever think to do something similar except Microsoft .NET cuz everything they do sux which is why they have monopolistic market share lol
Name:
Anonymous2009-05-09 17:20
why is this thread revived, java sucks. end of thread..
Name:
Anonymous2009-05-09 17:20
why is this thread revived, java sucks. end of thread..
it depends... java has some benefits... like... well...
Name:
Anonymous2009-05-10 1:06
>>109
I think your post got cut off mid way through good sir. Were you about to say portability, scalability, ease of use, ease of learning, large api, robust, and customizable?
There are times were the benefits of OOP are clear. Java forces everything to be "OOP," even those things that OOP makes much more cumbersome. If you've ever written non-trivial software with extreme zeal for OOP, you'd find the difficulty in, for example, hunting down precisely what the problem is in a multi-threaded application that's increasing AES encryption when it should not be. So in order to be scalable, you can't even do it pure OOP (which the language tries to force on you).
It's not easy to use. The syntax is often pig disgusting, but that's a personal preference that has no bearing on its ease of use (except to me). Still, good luck hunting down exactly what you need given the extreme OOP segmentation of that standard library. Not to mention having to learn the syntax for everything when you finally hunt that shit down.
It's not easy to learn, in the sense that you'll still make totally shit applications if you just dive into it without memory optimization. Most nontrivial tasks eat up tons of memory with Java. The fact that it abstracts the memory away makes it more "newb-friendly," but it shouldn't be considered for any serious application without great expertise in Java. And why would you even want to be a Java expert with all its other issues?
Large API is a benefit.. how? I think, by the way, you mean "excessive API." One man's trash is another man's gold mine, and apparently you think this trash is a gold mine. There's a good reason that Java is described as bloated.
Customizable? I laugh. It's about as customizable as a haxed anus.
I realize there's a fair share of trolls here, but this thread is largely comprised of the typical college kid who thinks his toy/academic language or C is superior to everything else out there.
The sooner you get it through your head that a language is simply a tool, the better your life will get.