Indexing access for Lists and Maps considered harmful?

Reinier Zwitserloot reinier at zwitserloot.com
Wed Jun 24 13:02:18 PDT 2009


That isn't a retrofit; existing implementations simply do not work  
unless you statically import a newly written method. trying to write a  
generic form of such a method would have to build it from the put and  
get primitives, which puts you in the same boat: needless and expected  
get calls in 99% of all assignments. So, no, you haven't shown this.

  --Reinier Zwitserloot



On 2009/24/06, at 21:37, Neal Gafter wrote:

> On Wed, Jun 24, 2009 at 12:25 PM, Reinier Zwitserloot <reinier at zwitserloot.com 
> > wrote:
> Neal, your conclusion that, instead of combining a set/put and a get  
> call, we need a new interface / desugaring to a method you then  
> statically import / extension method in / etc - which has a single  
> call that takes in a value, and returns the post-conversion  
> representation of that value, cannot be reconciled with  
> java.util.List, nor with java.util.Map, without breaking backwards  
> compatibility.
>
> I've already shown how to retrofit that solution to List and Map  
> without breaking backward compatibility.




More information about the coin-dev mailing list