[css-regions] Reworking getNamedFlows()

I would prefer getNamedFlows() to return a [MapLike] object instead of this hybrid collection with getters. My main reason not to like it is that it causes issues when some flow is named "length" or "item" because developers expect document.getNamedFlows()[flowName] to return the flow, which it doesn't. It's also somehow expensive to generate and then GC that mixt int/index-NamedFlow map, which is a waste if the author goal is just to retrieve one single flow by name, or just iterate over the collection.
 
If [MapLike] isn't a solution due to iOS7 target, can we settle instead on getNamedFlows() to return a sequence<NamedFlow> and add a new method, getNamedFlow(name), to return a NamedFlow? Those seems two different use cases to me anyway. You either want all flows to iterate over them or just one by name.
 
Thoughts?
 		 	   		  

Received on Saturday, 27 July 2013 03:48:52 UTC