Re: Java Generics and Erasure foobar
- From: Mark Space <markspace@xxxxxxxxxxxxx>
- Date: Tue, 30 Sep 2008 15:06:34 -0700
Peter D. wrote:
I'm not a very experienced programmer. I've been working for a java
house for almost a year. But it seems to me HackerBob has more
experience writing code than reading it. Reading code that uses
generics makes it so much faster to learn and understand the code. It
is much easier to see what is what when it is plainly written out for
you. So IMHO not only do generics help to find problems earlier but
also help when you've inherited a code base and need to learn how it
all works quickly.
It seems to me that HackerBob has little experience maintaining code as well. Remember that last box in the classic waterfall diagram? It's pretty important. Some projects have more money spent on them during the maintenance phase than during the design-develop-test phases combined.
Generics helps ensure that someone else reading your code won't see that a method (let's say List add(Object)) doesn't take an Object at all but instead requires a String or Integer. With a modern IDE, these mistake aren't caught at compile time but earlier, as the editor will display the method documentation as you type. (And flag errors too after you type them.)
Or instead of "someone else" yourself 18 months after you last touched a package you wrote.
Bob seems overly focused on his typing and seems to be lacking a larger perspective.
.
- Prev by Date: www.502dating.com
- Next by Date: Re: Escape input
- Previous by thread: www.502dating.com
- Next by thread: Re: Java Generics and Erasure foobar
- Index(es):
Relevant Pages
|