Call for input -- point lambdafication

Per Bothner per at bothner.com
Wed Aug 24 16:02:39 PDT 2011


On 08/24/2011 03:26 PM, Brian Goetz wrote:
> What I'm asking for here is examples of methods *OUTSIDE OF COLLECTIONS*
> that take advantage of lambda, that you'd be sad if they didn't show up
> in the library eventually.

This isn't quite what you;re asking for, but it's related:

I think org.w3c.dom.NodeList should implement map/filter/etc methods just
like collections.  And the best way to do that IMO is to change NodeList
to extend java.util.List.  That means adding a bunch of defender methods
to NodeList.  (One that add/remove items will have to throw an
UnsupportedOperationException - but we can encourage implementations to
provide them.)

In addition to the technical issues, which I haven't considered very 
carefully,
the bigger issue may be political: NodeList, like the other org.w3c.dom.*
interfaces are defined in W3C standards that are not under our control. 
  Also, these
interfaces are specified in a "language-independent" way so we get the 
similar type
for JavaScript.

So fixing this may be too politically complicated - which would be a shame.
-- 
	--Per Bothner
per at bothner.com   http://per.bothner.com/


More information about the lambda-dev mailing list