Hacker News new | past | comments | ask | show | jobs | submit login

It doesn't work for all scala interfaces, and when it is like that, it's often frustrating to find the underlying implementation.

But that's beside the point—OP was pointing out that you can't have generic allocation.

However there are mostly alternatives for Java8 something like that: Collections.singletonList(1, 2, 3) which actually gives a List<Int> by the end it all comes down to syntactic sugar.

Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact