> > For us, we were overriding some of the swing classes, and the somewhere > down the road more methods were added to the base class. Getting the code > to compile was not too hard - but this was code that was last likely > touched over 5 years ago and we did not have the expertise in house. So it > just meant more time needed to be spent to resurrect the code. >
That's exactly the reason why the .NET authors decided against virtual-by-default like in Java. Interesting subject though. I reckon all of us in here have written our own domain-less StringUtils, NumberUtils, DateUtils etc. which are obvious candidates for reuse. Especially since extension methods are now on its way into Java! I realize Maven, NuGet etc. lets us easily pick down packages we know. But what about the whole discovery problem? How would we better benefit from each-others work?! Perhaps via metadata: @Supplements(java.util.Date.class) static class DateUtils{ static Pair<Date, Date> getWeekSpan(Date date, Locale locale){ ... } } Whoops, now we need a Pair class... so I'd argue the problem is not how to reuse, the problem is how to easily find, and link, the stuff we can reuse. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/WFRNRcKRU9IJ. To post to this group, send email to javaposse@googlegroups.com. To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.