3 ms·
I wasn't referring to libraries, i was specifically referring to the language itself and the language was simpler. Also i never worked with J2EE, in fact i work
by Crinus 7y ago
I wasn't referring to libraries, i was specifically referring to the language itself and the language was simpler. Also i never worked with J2EE, in fact i worked with the complete opposite: J2ME. While it had a lot of pains, these were largely with the implementations not the language nor the APIs both of which were very simple. Though even before J2ME i mainly dabbled with applets which again were mostly simple (that was Java 1.1 btw thanks to MS Java).
Also i've written a lot of Java at the past and most of it was during the pre-1.5 days and i do not remember ever writing anything like the example you used as an ugly one, that looks contrived. For starts, i think i've only stored multiple object types in an array list very few times, most of the time it only stored a single type so i didn't need to check for the instance. Furthermore these array lists were most often hidden behind a higher level API, so you'd get "addFoo(Foo foo)" and "removeFoo(Foo foo)" that would add the object to the list (and often do additional bookkeeping, like set some flag or call a method in foo).
And of course i do not remember ever needing something like incrementing an integer list.
Sure you can make a mess of a codebase, but doesn't mean you have to. Just because someone (apparently a lot) believe that a SomethingFactoryFactory is a good way to approach things it doesn't mean that you have to follow it. Often a plain old "new" is just enough.
Also when i refer to outside forces i do not refer to whoever writes those drafts, i refer to those who ask for features that cause the drafts to be written.