Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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]
  ignore  |  Print  
  Have we all jumped the gun on Java's implementation of generics?  (Read 7170 times)
0 Members and 1 Guest are viewing this topic.
Offline Mark Thornton

Senior Devvie





« Reply #30 - Posted 2005-07-20 09:23:07 »

Generics might make sense in some absolutely time-ciritcal places in code if they eliminated those run-time checks, but I don't think they can as they are pure syntactic sugar.  There were no VM changes made to support them.
Covariant returns may eliminate some runtime checks. This didn't require a VM change because the return type was already part of the signature at VM level. It is a pity we had to wait for generics to get covariant returns.
Offline Jeff

JGO Coder




Got any cats?


« Reply #31 - Posted 2005-07-23 04:39:44 »

Interesting, thanks.

I just learned something new about coding Java Smiley

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline tortoise

Junior Devvie




<3 Shmups


« Reply #32 - Posted 2005-08-01 13:02:52 »

I dislike generics because they took what was once a very simple and elegant language and made it look like C++. I think Java's readability was one of its strong points.

I like generics because they also in their own way increase readability. Specifying what type of objects a container contains is very helpful in reminding what it was for (this was a life saver after coming back to some code I hadn't touched in months). And of course increased type safety is always a plus as often mentioned.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jeff

JGO Coder




Got any cats?


« Reply #33 - Posted 2005-08-01 20:12:22 »

I've finally focused why I dislike genreics.

They are incomplete syntax.

For example, take this statement
    private MyClass<MyOtherClass> foo();

What does that synatx mean? The answer is its not competely defined. I have no idea what <MyOtherClass> is being used for without consulting the definition of MyClass.

We avoided a mcro pre-processort in Java originally for just thsi reason-- its the fastest way in C to unreadable code.

But now we've brought it in anyway.

And i thin kthe oroginal decision was the right one.

       

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline K.I.L.E.R

Senior Devvie




Java games rock!


« Reply #34 - Posted 2005-08-01 22:23:54 »

I think Java should have is either runtime generics or auto casting without generics.
Any chance this will happen?

Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #35 - Posted 2005-08-01 22:40:03 »

Sun? Go back on a publically made decision that's now crafted in API stone?

Chances it'll change are somewhere between nil to zero.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline K.I.L.E.R

Senior Devvie




Java games rock!


« Reply #36 - Posted 2005-08-03 04:37:54 »

I've read something positive about generics for a change:
http://www.thepostmodern.net/blog/BlogEntry.jsp?id=151

Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Pages: 1 [2]
  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.

rwatson462 (33 views)
2014-12-15 09:26:44

Mr.CodeIt (23 views)
2014-12-14 19:50:38

BurntPizza (51 views)
2014-12-09 22:41:13

BurntPizza (84 views)
2014-12-08 04:46:31

JscottyBieshaar (45 views)
2014-12-05 12:39:02

SHC (59 views)
2014-12-03 16:27:13

CopyableCougar4 (58 views)
2014-11-29 21:32:03

toopeicgaming1999 (123 views)
2014-11-26 15:22:04

toopeicgaming1999 (114 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!