[gameprogrammer] Re: What do I need to download develop a client/server java applet?


On 21 Jul, 2005, at 5:56 PM, Fernando Arturo Gómez Flores wrote:
Java does not support generic programming (and don't say that Java does
generic programming through that 'object' thing since this is not true).

I'm not sure how this is true (java does not support generic programming). I realized I may have been a little shaky on my definition of generic programming, so I looked it up on the wikipedia, just in case. It has this to say in its general statement on the subject:


"...generics is a technique that allows one value to take different datatypes (so-called polymorphism) as long as certain contracts such as subtypes and signature are kept."

It also lists Templates examples (like List<T>) from C/C++ as a form/ way of doing generics.

Java does this. I can make an ArrayList object as such (ArrayList being one of the standard Java classes):

...
ArraList myList = new ArrayList<String>();
...

And it will forever more accept only String objects to add, and yield only String objects when you pull one out of the list. Is this not generics?

I'm not trying to argue, but I really want to know what about Java makes it so it does NOT support generics.

Thanks,
--Scott

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: