3 ms·
> type inference There is a JEP (286) for that. Personally I consider it highly harmful. I regularly read C# source of unknown libraries outside of an IDE (Lik
by Traubenfuchs 10y ago
> type inference
There is a JEP (286) for that. Personally I consider it highly harmful. I regularly read C# source of unknown libraries outside of an IDE (Like on Github) and very often I don't have the faintest clue what type a var holds even it is just a type well known to me, making navigation of that code very difficult.
> lazy properties
This looks interesting. I don't think Java will ever offer it though.
> Dynamic
Why would you want to kill the static type safety we cherish so much? I only ever had to use dynamic in C# when working with horrible legacy APIs. Besides that, interface proxies and cglib proxies (bytecode manipulated classes) are heavily used in Java frameworks and do the delegation you talk about.
> Structs
Value types will be available in Java 10. (JEP 169: "Provide JVM infrastructure for working with immutable and reference-free objects, in support of efficient by-value computation with non-primitive types.")
- kartickv 10y agoHow is it harmful to say: var foo = new Foo(); as opposed to: Foo foo = new Foo(); ? As for "killing the static type safety we cherish so much", that's a one-sided view. There are situations when dynamic typing works better, say when working with JSON, and in any case, static typing has many problems: https://kartick-log.blogspot.in/2016/05/statically-typed-languages-need-better.html https://kartick-log.blogspot.in/2016/05/statically-typed-lan...