4 ms·
It predates generics at least.
by foota 9y ago
It predates generics at least.
- Retric 9y agoGenerics don't solve the TypeDef problem. It's the old, I am probably never going to need anything over 2 billion, but I am not 100% sure.
- AstralStorm 9y agoGeneric method syntax is both much more limited and more complex... Foo<? super Bar extends Madness> with various insane limitations. Makes C++ SFINAE seem elegant...
- foota 9y agoI was talking about the following: "Now, in Java, if you use a data container provided by the language, you are forced to upcast all the time." Which is solved by generics.
- Retric 9y agoLast I checked, if you store an int in a generic it get's converted to an object which takes more memory to store. So, the syntax is similar, but the actual behavior is not because int's can't be null, but Integers can for example. This costs 8 ish bytes of memory.
- foota 9y agoThat is true. It looks like there is some work being done to potentially relax this constraint, http://openjdk.java.net/jeps/218 http://openjdk.java.net/jeps/218
- zokier 9y agoAnd according to Wikipedia generics were added to Java in 2004, so that gives some baseline. JSR14 was for introducing generics, and it was initiated in 1999. That leaves 5 year window during which the article was most likely written.
- khedoros1 9y ago> And according to Wikipedia generics were added to Java in 2004 I was in college around that time, using Java as a language for coursework. The professors jumped on generics right away, so between two quarters, the style that we wrote our Java in shifted drastically. I was nice to rip the band-aid off that fast.