Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's nothing wrong with doing 'new T' in a generic method or class body. It requires a constraint on the type variable is all: that some constructor with a specific parameter list is available.


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

Search: