atom feed17 messages in org.jdom.jdom-interestRe: [jdom-interest] Java 5 planning
FromSent OnAttachments
Jason HunterMar 4, 2008 1:39 pm 
Victor ToniMar 4, 2008 2:55 pm 
RolfMar 4, 2008 5:58 pm 
Mattias JiderhamnMar 4, 2008 11:38 pm 
Mattias JiderhamnMar 4, 2008 11:49 pm 
Michael KayMar 5, 2008 1:36 am 
Joe BowbeerMar 5, 2008 5:05 am 
Victor ToniMar 5, 2008 5:24 am 
Michael KayMar 5, 2008 7:15 am 
Mattias JiderhamnMar 6, 2008 12:04 am 
Jason HunterMar 8, 2008 12:43 am 
Michael KayMar 8, 2008 1:58 am 
Jason HunterMar 8, 2008 2:49 am 
Michael KayMar 8, 2008 9:49 am 
Timothy MarcMar 8, 2008 12:26 pm 
Mattias JiderhamnMar 12, 2008 2:03 am 
Tatu SalorantaMar 12, 2008 9:41 am 
Subject:Re: [jdom-interest] Java 5 planning
From:Mattias Jiderhamn (mj-l@expertsystems.se)
Date:Mar 6, 2008 12:04:13 am
List:org.jdom.jdom-interest

Michael Kay wrote (2008-03-05 16:15):

Actually every occurrence of String as a parameter could be changed to CharSequence allowing the user to pass String, StringBuffer, and StringBuilder or even CharBuffer.

The downside is that (a) you can't assume that the supplied value is immutable; if you need to retain it beyond the call you have to make a copy; (b) there can be a lot of "instance of" testing to see what kind of CharSequence you've been given, and (c) you can't compare different kinds of CharSequence for equality.

Another downside is that the API will be less trivial for novice Java programmers. (So there will probably be more traffic on this list...)

/Mattias