@benleggiero My immediate reaction was similar to @dmitry.petrov: it’s going to be hard to make a case for this that is not adequately captured by abstract factories. C# offers this concept, so that you can call
new
on a type parameter, but I’ve always found it unnecessary since you can just as well pass a lambda factory method.
b
benleggiero
03/28/2017, 12:29 AM
Right, and there's nothing that Kotlin does that couldn't be done with some Java pattern, but I think the aim is to be better and easier than that