Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3
  ignore  |  Print  
  Tiger, Mustang, Dolphin  (Read 7797 times)
0 Members and 1 Guest are viewing this topic.
Offline Grazer

Junior Member




My other avatar is much more flattering.


« Reply #30 - Posted 2004-12-08 10:19:37 »

Quote
D is shaping up to be a nice alternative. I'm finding myself working with it more and more. Many of the newsgroup regulars are disgruntled Java programmers.

The funny thing (about this being at the end of this thread) is that D has generics and operator overloading, which are things people are complaining about Java having! Or maybe they're complaining about how they were implemented but being subtle about it....?

Current Project: Easy Decal
Other Stuff: grlea online
Offline phazer

Junior Member




Come get some


« Reply #31 - Posted 2004-12-08 10:22:58 »

Quote
I just set Eclipse to 1.4 and let it complain Smiley


Problem is I like and use generics, enums, varargs and foreach. I just want to disable static imports and autoboxing.

Btw, the 1.5 support in Eclipse is ridiculously bad. It doesn't even seem to support switching on an enum object.

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #32 - Posted 2004-12-08 10:44:01 »

Mostly it's complaints about the implementation of generics. The only real advantage generics have now is eliminating having to type (casts) all over the place and that comes at the expense of some fairly ugly syntax in its place instead - with no performance boost.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline phazer

Junior Member




Come get some


« Reply #33 - Posted 2004-12-08 11:15:58 »

I'm not using generics for performance reasons (because as you say, there are none), I use it for code clarity and better IDE help. The information content in the code is increased when using generics.

I think the generics syntax is ok, I can't think of a better one.

And yes, the generics support in Eclipse is quite bad. Smiley

Offline Grazer

Junior Member




My other avatar is much more flattering.


« Reply #34 - Posted 2004-12-08 11:41:05 »

Quote
I just want to disable static imports and autoboxing.

What's the problem with static imports?
Aside from losing a little bit of context.

Current Project: Easy Decal
Other Stuff: grlea online
Offline phazer

Junior Member




Come get some


« Reply #35 - Posted 2004-12-08 12:43:15 »

Quote

What's the problem with static imports?
Aside from losing a little bit of context.


That is the problem. The class name before a static method or variable is quite important for someone trying to read your code. The key strokes saved when writing the code are definitely not as important.

In some cases it's trivial to understand which method you refer to, for example sin() -> Math.sin(), but in the general case I think static imports should be avoided.

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #36 - Posted 2004-12-08 12:57:14 »

Quote

In some cases it's trivial to understand which method you refer to, for example sin() -> Math.sin(), but in the general case I think static imports should be avoided.


The same could be said for most of the additions to java 5. And people wonder why we complain that it's a step backwards...

malloc will be first against the wall when the revolution comes...
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #37 - Posted 2004-12-08 13:55:54 »

I've no problem with static imports - although I have a sneaking suspicion that you should only ever be allowed to statically import from ONE class in a single file.  The situations where static import is a significant improvement are quite specific, however.  Maybe javac should refuse to compile a class with static imports if it doesn't think it warrants it? Grin

And Blah, I disagree!  On the contrary, I think Generic Collections are a vital part of any stable application, if only because of the reduction in the chance for human error.  And the enhanced for-loop is a great addition to the language.

But autoboxing?  No thanks.  There are too many circumstances where it requires more thought and more care, else undesired operation will result.  And annotations will continue to be irrelevant for many moons to come.

Hellomynameis Charlie Dobbie.
Offline phazer

Junior Member




Come get some


« Reply #38 - Posted 2004-12-08 14:12:31 »

Yes, saying the Java 5 is a step backwards is a bit too much. There are some good additions. Generic types, although it could have be implemented better, is better than no generic types. Enums is a good addition. The enhanced for-loop is nice because it expresses the programmers intention better.

Offline DaveLloyd

Junior Member




Making things happen fast with Java!


« Reply #39 - Posted 2004-12-08 14:52:19 »

There seem to be a lot of complaints raise against generics here - anyone care to give a succinct explanation of (or link to) what those are?

But I'm surprised that noone has mentionned the abomination that is varargs...

Java does seem to be in danger of sliding down the slippery path that C++ has ended up at the bottom of. It is a danger of all languages as they mature. But it's a tough choice - either keep the original (probably well conceived) feature set and let it stagnate - or pander to the whims of the users (who frankly rarely have a clue about language design). Overall I have to say Sun are doing a reasonable job, probably the best of any recent language standards. I've been an observer on X3J3, the Fortran 90 committee which mostly ended up as "what IBM or DEC want, they get"  - I'm really glad I never had to implement their braindead attempt at OO. And I'm very grateful not to have anything to do with the C++ committee as every little wish seems to end up being granted.

Dave

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline MasterDirk

Senior Newbie




Somebody set up us the bomb...


« Reply #40 - Posted 2004-12-08 15:02:46 »

Can anyone explain to me why they didn't remove primitives and make them Objects? Seems to me that would be a much better feature of the language (All OO, no exceptions). The compiler could still look at them as primitives, but they should fit into the paradigm...

Just my ยค0.02
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #41 - Posted 2004-12-08 15:26:43 »

I don't get why everyone wants everything to be an Object... "when the only tool you have is a hammer, every problem looks like a nail" etc.

Cas Smiley

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #42 - Posted 2004-12-08 15:35:23 »

Quote
Can anyone explain to me why they didn't remove primitives and make them Objects?


Because without them java performance is "worse than you could possibly imagine".

Unless someone spends a significant amount of time rewriting the JVM to efficiently convert every object into a non-object (or to use lightweight objects everwhere).

PS: when I mentioned "step backwards" I was thinking of the whole thing rather than one specific aspect (there are major unresolved flawd with each of the new additions) and the fact that some of us acutally maintain code (shock!) and appreciate the hell that we're being set up for by those crusaders for making java into VB. I have a horrible fear of myself turning into a reactionary project manager who dumps on anyone in the team who ever uses generics in any code, with me having to throw the baby out with the bathwater becuase generics causes so many problems we (as a team) can't afford to use it in the project (where you could have 10% of your team not competent to touch it, and a further 50% who will be slowed down in their productivity every time they encounter it and have to work around it's horrors).

The vague, ill-defined ideas behind generics are fine. That someone [1] chose to plough ahead and implement these vague wishy-washy ideas before really working out a good spec, and then hacked together a load of crap to make it sort-of-work the way people sort-of-expected-it-to, is a disaster [2]. Generics as implemnted in java 5 is a train-wreck. You *can* use it effectively, it *can* save you time, but ... it also *can* f*** you over and open a whole can of worms on your previously clean, sensible, cheap to maintain code.

[1] If it actually happened this way, then the JCP needs massive reform. But...the end result looks just as if this did happen. We have a system whose veyr name is completely misleading, and most of the documentation and press in the months leading up to release were equally misleading, with *most* people misunderstanding what it was going to be, and then being very surprised by what it turned out to be.

[2] Well, unless you wanted to program in VB anyway. As noted above, in that case you don't notice that your code has become vastly expensive to maintain - all VB code is like this anyway. You probably only see generics etc as good, in this case. Which is why lots of people like it.

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #43 - Posted 2004-12-08 15:41:09 »

Quote
I don't get why everyone wants everything to be an Object... "when the only tool you have is a hammer, every problem looks like a nail" etc.

Cas Smiley


Maybe they subconsciously realised that java is only 90% OOP language (until java 5 and covariant types, which take it to perhaps 95% or maybe more?), and wanted subconsciously to try and "fix" this.

Or, alternatively, because OOP so revolutionized the maintenence and re-use costs of program code that it became a juggernaut whereby many people entering the industry since 1990 no longer realise that OOP == way to deal with "data with complex methods", and so don't appreciate that sometimes you have "data that is merely data" (hence a waste of time to put it into objects), or even "complex methods that have nothing to do with data" (hence if your language only does objects, you get screwed over. c.f. java's poor function despatch, which can't really cope with the situations where you don't have any data, but just a vast sprawling collection of methods [1]).

[1] i.e. it becomes grossly expensive to manage the codebase. This is a PITA to anyone trying to develop a large RPG, because you have thousands of small code fragments and it's simply too expensive to maintain in java.

malloc will be first against the wall when the revolution comes...
Offline DaveLloyd

Junior Member




Making things happen fast with Java!


« Reply #44 - Posted 2004-12-08 15:43:20 »

blahx3 wrote:
Quote

The vague, ill-defined ideas behind generics are fine. That someone [1] chose to plough ahead and implement these vague wishy-washy ideas before really working out a good spec, and then hacked together a load of crap to make it sort-of-work the way people sort-of-expected-it-to, is a disaster

Sorry to keep pressing on this one but I really want to know why you dislike generics. I confess I've only scratched the surface so far and only a few days ago discovered the difference between List<Fred> and List <? extends Fred> so want to know what pitfalls await me.

Generics and Java have after all been around for quite some time with Pizza back in 99 (later renamed Generic Java hence probably the 1.5 name for this facility). This was written by a team at INRIA who certainly understood their type theory - and was AIUI a counter-response to a request from Siemens for templates in Java. So I would have thought there had been plenty of time to thrash out the issues. Pizza seemed well thought out and I nearly used it in our massively multiplayer game engine of the time but went my own route instead. How does 1.5 and Pizza/GJ differ in this?

Dave

Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #45 - Posted 2004-12-08 15:46:31 »

Quote
But I'm surprised that noone has mentionned the abomination that is varargs...


I've completely blocked them out.  Preposterous, absolutely preposterous!  As far as I can see, varargs were included solely to allow the creation of a C-style printf statement.  What a mess.

Hellomynameis Charlie Dobbie.
Offline phazer

Junior Member




Come get some


« Reply #46 - Posted 2004-12-08 16:01:14 »

Quote


I've completely blocked them out.  Preposterous, absolutely preposterous!  As far as I can see, varargs were included solely to allow the creation of a C-style printf statement.  What a mess.


I actually kinda like varargs Smiley Saves me from writing myObject.myMethod(new Type[] {obj1, obj2...}) all the time.

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #47 - Posted 2004-12-08 16:07:45 »

Quote
blahx3 wrote:
Sorry to keep pressing on this one but I really want to know why you dislike generics.


I started writing it up a couple of months ago, and got to 8 screensfull of pure text, and still hadn't finished. I put it aside, intending to finish it off and put it online somewhere once I had time - but I've had no time since then.

One of the simple things that spring to mind is that generics breaks arrays. Try mixing the two, and discover what bugs it introduces into the language. It's nasty: generic types are IIRC the only thing that don't work with arrays transparently

Quote

and I nearly used it in our massively multiplayer game engine of the time but went my own route instead.


The story-engine one, yes? Smiley

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #48 - Posted 2004-12-08 16:09:36 »

Quote


I've completely blocked them out.  Preposterous, absolutely preposterous!  As far as I can see, varargs were included solely to allow the creation of a C-style printf statement.  What a mess.


See? See? You'll get there eventually: Java 5 is an abomination that should have been strangled at birth Grin.

Or, more literally, "has JCP additions that should have been vetoed and prevented from making it into core java".

Modulo my previous comments outlining the people who actually benefit from them...

malloc will be first against the wall when the revolution comes...
Offline Middy

Junior Member




Java games rock!


« Reply #49 - Posted 2004-12-08 16:29:03 »

Heh I think programmers are like players in a game. Nomatter how carefull you implement new features, someone will always complain :-)

When do I get my makeMyGameAsILike() extension?
Offline DaveLloyd

Junior Member




Making things happen fast with Java!


« Reply #50 - Posted 2004-12-08 16:48:24 »

Middy wrote:
Quote
Heh I think programmers are like players in a game. Nomatter how carefull you implement new features, someone will always complain Smiley

How right you are - they'll certainly find every exploit.

Offline nonnus29

Senior Member




Giving Java a second chance after ludumdare fiasco


« Reply #51 - Posted 2004-12-09 01:16:45 »

Quote


Yeah, but were would you go?  What other platform or language can give you half of what java does?


blah^3 never answered this question; Others said D, but D isn't cross platform yet is it?  gnu D could exploit the ubiqity of the gnu tool chain, but you still need libs like sdl and opengl (ie lwjgl).  

Just curious.
Offline Bombadil

Senior Member





« Reply #52 - Posted 2004-12-09 05:51:08 »

Well, well, ... just comments on Tiger? The heading says Tiger, Mustang, Dolpin. :-)

One comment about Tiger's features hit the nail on the head: you needn't use them. There are cases when static imports are very handy (I admit it's good to use it rarely; as Tiger's readme states). Still it's up to you to use or not to use it. Same applies to autoboxing. And so on. How many of you have to read the source codes of other people intensively? Very few I guess. So... I don't think Tiger's features are the reason there are so few nice Java games around... ;-)

What I liked most about the interview has been this sentence:
Quote
I suspect that the Java language will be good for another 20 to 30 years if we manage its evolution carefully.

20 to 30 years would be nice. Even our children could learn the Java platfrom from us then. That would be great.
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #53 - Posted 2004-12-09 08:27:03 »

Quote
How many of you have to read the source codes of other people intensively? Very few I guess.


You think? :o

At least 90% of my job involves reading other people's code, and I expect that's true for many others here.  Green-field projects really aren't the norm in business development, you'll almost always be modifying or integrating with someone else's code.  And even if you are writing something new, there'll be third-party libraries you need to use to get things working.

No, good source-code readability is vital for any language in today's market.

Hellomynameis Charlie Dobbie.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #54 - Posted 2004-12-09 08:54:35 »

Quote

At least 90% of my job involves reading other people's code, and I expect that's true for many others here.
...
No, good source-code readability is vital for any language in today's market.


Cannot. Emphasize. This. Too. Much.

malloc will be first against the wall when the revolution comes...
Offline Bombadil

Senior Member





« Reply #55 - Posted 2004-12-09 08:57:40 »

Quote


You think? :o

At least 90% of my job involves reading other people's code, and I expect that's true for many others here.

Java games I meant.
Most games (in general) I've seen the source code of, have been green-field projects.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #56 - Posted 2004-12-09 08:59:31 »

Quote


blah^3 never answered this question; Others said D, but D isn't cross platform yet is it?  gnu D could exploit the ubiqity of the gnu tool chain, but you still need libs like sdl and opengl (ie lwjgl).  

Just curious.


Well, scripting languages are all crap today. They've hit the point of being quite nice to use, but performance is beyond god-awful. Give them a few years to all move to running on JVM's, and...

But, for now, that leaves only two options: C++ and C#

I used to be a professional C programmer, so long ago that I can barely remember it, but at least the adoption cost of C++ would be relatively low for me (I did do some C++ as well, just not for long).

C# would pain me to use, psychologically, because I'd keep thinking "that's inferior to java", "java does this bit better", "java does that thing faster", etc. But ... it does have *some* good points, and at least I'd retain some x-platform ability.

But, realistically, I'd be moving to C++. D is a complete no-hoper for me, for the myriad reasons I've mentioned before when it's been suggested (in brief: non-existent levels of usage, debugging, and support; retains the worst bits of C and adopts some of the poorer parts of other langs too; almost nothing significant to recommend it over java).

malloc will be first against the wall when the revolution comes...
Offline aldacron

Senior Member


Medals: 9
Exp: 16 years


Java games rock!


« Reply #57 - Posted 2004-12-09 09:35:26 »

Quote

But, realistically, I'd be moving to C++. D is a complete no-hoper for me, for the myriad reasons I've mentioned before when it's been suggested (in brief: non-existent levels of usage, debugging, and support;[/qote]

Ugh! I find D infinitely better than C++. It has a low level of usage becuase it hasn't officially been released as 1.0 yet, but the user base is steadily growing. It's had debugging support from the beginning (throrugh win Debug, and now supports gdb). As for support, post a bug on the bugs NG and it's usually fixed in a release or two. Have problems with anything else and the digitalmars.d NG can usually help out. Once it's officially released, then you'll be seeing a higher level of support.


Quote
retains the worst bits of C and adopts some of the poorer parts of other langs too; almost nothing significant to recommend it over java).


I don't know where you're coming from here. The fact that you can interface directly with C is one of D's strengths. JNI is a nightmare, and potential performance killer. D is compatible at the binary level with C, which makes creating bindings to existing libraries like the various Win32 dlls, OpenGL, SDL, etc... a snap. Sure D supports pointer syntax, but it's only used when interfacing with C code. Structs are passed by value by default, while classes are treated as Java treats them - passing them by reference. Pointers are supported only for C compatibility, and when writing pure D code there's no need to use them. The function parameter modifiers in, out, and inout can be used instead.

I don't want to come off as a D evangelist, but if you spend any significant time with it you will find that it combines many of Java's best features with many of C++'s most useful features quite sucessfully. Like Java, the spec aims to leave nothing as 'undefined behavior'. You've got a GC that you can turn on and off at will, you can manually delete anything the GC allocated, you can allocate from your own memory pool outside of the GC if you need to, all class objects are references, arrays are bounds checked, all arrays are passed by reference, it has structs that are the same as C structs (which is a good thing),  pointer arithmetic is not supported (another good thing), Java-style interfaces (no C++ style multiple inheritance, a very well implemented template mechanism, yadda, yadda.

There are other features that have been borrowed from other languages, such as array slicing, associative arrays., delegates... There's a lot there that I wish Java had, or had implemented differently.
Offline phazer

Junior Member




Come get some


« Reply #58 - Posted 2004-12-09 09:51:04 »

I agree, from what I've seen so far D looks very nice (delegates, arrays, classes, interfaces, templates). But the success of the language will depend on the developer tools. To compete with Java (even in games programming) you must have a nice IDE with refactoring, debugging etc. This is the area where D needs to improve.

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #59 - Posted 2004-12-09 10:22:02 »

Quote


JNI is a nightmare, and potential performance killer.


OK, so what's so bad about JNI?

It certainly is NOT in general a "performance killer". In most cases where it might be you just have to use batching - which is often what you need to do anyway e.g. when rendering anything.

Quote

Sure D supports pointer syntax
...
there's no need to use them.


Pointers == bad thing from C.

You say "no need", but c.f. above one of my problems is that java is introducing "no need" stuff but IN REALITY I can assure you people will.

There was never any "need" to write crap incomprehensible massively op-overloaded C++ code. But thousands of people did it anyway.

Quote

I don't want to come off as a D evangelist, but if you spend any significant time with it you will find that it combines many of Java's best features with many of C++'s most useful features quite


I think you simply fundamentally disagree with me what "java's best features" are. That you say it lacks pointer arithmetic (one of C++'s best features, albeit also something I'd prefer to be without) suggests we also disagree on C++'s best features.

Your list, once stripped of feasibly useful but, in pratice, largely irrelevant things (who cares that I can allocate outside of the GC's control? If I wanted to do that, I wouldn't be using a GC at all), sounds like "it's much less safe than java, and lacks all the big runtime advantages, yet it also lacks some of the most fundamentally important aspects of C++".

Which pretty much sums up my previous evaluations of it. I'm well aware I may be missing the point here, but D has never seemed anything more than a toy project where some people wanted a few minor alterations to java or C++ and couldn't be bothered to provide the whole of either (that would be impossibly too much work) but couldn't be bothered merely to customize either (could have been done from either end).

If you try to judge D by the standards of C++ or Java it falls laughably short. If you try to judge it by the standards of Ruby or similar it probably does OK - except that it has terrible syntax (C-esque) by comparison, and so it still loses out.

I don't have anything against it, I've tried (really) to find something useful there to me, but all I can see is a mish-mash of ideas that is neither one thing nor the other; trying to be many things but being second-class at all of them.

PS out of pure interest I'd like to know what use-cases it's ideal for, if you'd care to suggest some.

malloc will be first against the wall when the revolution comes...
Pages: 1 [2] 3
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (13 views)
2014-07-29 18:09:19

Riven (10 views)
2014-07-29 18:08:52

Dwinin (10 views)
2014-07-29 10:59:34

E.R. Fleming (28 views)
2014-07-29 03:07:13

E.R. Fleming (10 views)
2014-07-29 03:06:25

pw (40 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (27 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!