Hacker News new | ask | show | jobs
by brianbarker 3671 days ago
YES! to both parents here. Type erasure is a bitch.

Need to pass in a class type, but it's of a list?

List<YourType> list = new ArrayList<>(); yourfunc(list.getClass());

C# got all this junk right.

1 comments

You can now use lambdas as generic type references http://benjiweber.co.uk/blog/2015/08/04/lambda-type-referenc...