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

The other poster is right. That is typing, that is not static type checking.

You can write code like:

List<MyObject> mylist = new HashSet<Integer>() {{ add("string"); add(1L); }}

You will get groovy.lang.GroovyRuntimeException with constructor issues.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: