On 7/19/14 2:04 AM, Remi Forax wrote:
You can combine these 2 approachesi using a Ruby like builder approach with a
lambda,
which provide a builder object (so static method call are replaced by instance
method call) avoiding the creation of too many entry objects
Map.of(b -> b
         .entry(k0, v0)
         .entry(k1, v1)
           ...
         .entry(kN, vN))

Very interesting! I'll take a look at this approach.

Some of the internal feedback on this JEP draft before I posted it here was, (jokingly) "What, it doesn't use lambda??" Now we might have a way to work lambda into this. :-)

s'marks

Reply via email to