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

Quite often it is:

    Widget w = new SpecialWidget (junk);
though. I kinda like verbosity. There is less magic to reason about in the language overall.


Languages which use only inference have been written, but it's just not ergonomic, no one wants to use that. So the Widget is always available as an annotation (although I can't read your intent out of one line of Java clearly, and depending on what that is, a cleaner type system than Java's might take care of covariance well enough that we still wouldn't care), or as a cast.

Java itself introduced syntax for eliding the type of simple variables, so this is an old complaint, but yeah: a little bit of inference goes a long way.




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

Search: