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

Sometimes less is more. Not implementing every fancy feature under the sun might be a bonus and keeps the language clean.

I know I never managed to like generics in Java. Don't know C#, though.



Java generics are an example on how not to do it, but it does not mean all generic implementations are like Java's.


Hope you write some further explanation for your statement, because so far it looks like part of this c++ vs. java flame.


- Type erasure. Going the .NET way would be a better approach on my opinion;

- Lack of type definitions. If it was possible to declare types in Java, the generic declarations wouldn't need to be so monstrous;

- The common co-variance/contra-variance issues with the generic types;

- Lack of support for builtins;

- No way to specialize generic algorithms for specific types


Languages like SML and OCaml are pretty clean, pretty simple and have an awesome parametric polymorphism system.


I'll put them on my "to be checked out" list.




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

Search: