bearstampede / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

Generics Support #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When using Piccolo in the past it's always been annoying to me that it 
didn't use Generics.  It'd cut down on the code base a bit since there's 
lots of boilerplate iterator usage.

I know it's a bit early for feature requests, but... it would be nice.

Thanks

Original issue reported on code.google.com by allain.lalonde on 23 Jun 2008 at 1:53

GoogleCodeExporter commented 9 years ago
Hi Allain,
I don't know if compatibility to JDK < 1.5 is required. If this is the case, 
there'll be no generics in the near future, I think.

Original comment by mr.rohrm...@googlemail.com on 23 Jun 2008 at 1:58

GoogleCodeExporter commented 9 years ago
Seems weird that it would be. What's the point of a framework with its hands 
tied?

Original comment by allain.lalonde on 23 Jun 2008 at 5:00

GoogleCodeExporter commented 9 years ago
What benefit do you expect from generics?

Original comment by mr.rohrm...@googlemail.com on 23 Jun 2008 at 6:20

GoogleCodeExporter commented 9 years ago
Sorry, I overlooked your reply in 
http://groups.google.com/group/piccolo2d-users/msg/
f43dbfa0a0ec8376

So the benefits are fewer LOC under the hood (PNode elem = 
(PNode)iterator.next;) 
and typesafe child-node collections.

Original comment by mr.rohrm...@googlemail.com on 23 Jun 2008 at 6:33

GoogleCodeExporter commented 9 years ago

Original comment by mr.rohrm...@googlemail.com on 9 Jul 2008 at 12:17

GoogleCodeExporter commented 9 years ago

Original comment by mr.rohrm...@googlemail.com on 9 Jul 2008 at 12:21

GoogleCodeExporter commented 9 years ago
Attached is a patch that implements the Generics changes to the PNode class. If 
the
idea is accepted, I'll migrate the rest of the framework similarly. If nothing 
else,
it allows for easier to grok code.  Under the hood it generates similar code to 
the
Iterator approach.

Original comment by allain.lalonde on 8 Jul 2009 at 2:12

Attachments:

GoogleCodeExporter commented 9 years ago
Oh, forgot to mention all the JUnit tests pass, and you'll need to change your 
the
IDE to "1.5 compatibility" mode.  Although I think that should explicitly 
defined in
the maven config of the piccolo2d-complete module.

Original comment by allain.lalonde on 8 Jul 2009 at 2:14

GoogleCodeExporter commented 9 years ago
And here are the updated tests for the core

Original comment by allain.lalonde on 8 Jul 2009 at 2:28

Attachments:

GoogleCodeExporter commented 9 years ago
My team's projects recently moved to 1.5, so I'm okay with integrating generics 
into
Piccolo.  Of course, we should post our latest and greatest 1.4 compatible 
version
for teams that are still 1.4 only.  With our current resources, we'd probably 
also
reduce or stop all support for the 1.4 branch.  Maybe we should take an 
informal vote
about 1.5'ing Piccolo?

Original comment by samrr...@gmail.com on 8 Jul 2009 at 4:52

GoogleCodeExporter commented 9 years ago
I vote for adding generics. We're almost ready to drop support for 1.5 in our 
products; 1.4 has been off our 
radar for a couple years now.

Original comment by willismo...@gmail.com on 8 Jul 2009 at 8:04

GoogleCodeExporter commented 9 years ago

Original comment by allain.lalonde on 23 Oct 2009 at 9:01

GoogleCodeExporter commented 9 years ago

Original comment by allain.lalonde on 21 Jan 2010 at 5:40

GoogleCodeExporter commented 9 years ago

Original comment by heue...@gmail.com on 26 Nov 2013 at 9:11