Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

What is wrong with Generics?  RSS feed

 
Master Rancher
Posts: 3010
105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Pat, for bringing us all back into the real world

But to end (?) this topic in a more positive way:

What is great about Generics?

1) I like them a lot, type erasure or not

But most of all:

2) they sometimes give rise to very interesting and entertaining topics!
 
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Pat Farrell wrote:On the more general topic: what is wrong with Generics, their design and implementation?


My answer:
1. People expect too much of it.
2. The compiler warnings are crap.

If you actually read Gilad Bracha's paper (now, thankfully, translated to the tutorials), he explains the issues with implementation, which basically boils down to the fact that, for whatever reasons, Java was NOT able to make typed classes first-class objects, so they chose the next best option that was backwards bytecode-compatible: type erasure.

Winston
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!