Indexing access for Lists and Maps considered harmful?
Ted Neward
ted at tedneward.com
Wed Jun 24 01:22:50 PDT 2009
Why? Boxed values are read-only values, last time I checked.
Honestly, again, if the compiler wants to optimize the boxing on the grounds
of optimization, so long as the language semantics are preserved, then
that's fine with me. But the language semantics cannot change, not if the
Java community is going to trust the ongoing enhancements to the language.
Ted Neward | Principal Consultant, ThoughtWorks
Java, .NET, XML Services
Consulting, Teaching, Speaking, Writing
http://www.thoughtworks.com | http://www.tedneward.com
> -----Original Message-----
> From: coin-dev-bounces at openjdk.java.net [mailto:coin-dev-
> bounces at openjdk.java.net] On Behalf Of Mark Thornton
> Sent: Wednesday, June 24, 2009 12:55 AM
> To: Lawrence Kesteloot
> Cc: coin-dev at openjdk.java.net
> Subject: Re: Indexing access for Lists and Maps considered harmful?
>
> Lawrence Kesteloot wrote:
> > Neal's argument about the ability to return an "equivalent" object is
> > valid. Something has to give, that I would pick that. It's reasonable
> > in nearly all cases to just return the RHS object.
> >
> >
> If the RHS value is going to be boxed, I think it is important that it
> be boxed only once and not separately for each assignment.
>
> Mark Thornton
More information about the coin-dev
mailing list