Live data from Hacker News

Modern Java – A Guide to Java 8

github.com

41–50 of 203 posts

Re: Modern Java – A Guide to Java 8

#41
post #32

I've always had some sort of mistrust of Java (neo-Cobol ohnoes!) but I'm liking it more and more. Mostly I've come around to the fact that static typing isn't as bad as my young self thought (and can in fact be quite cool). The verbosity and "enterprisy" and committee oriented feel are still a bit off putting but I've made a commitment to try some Java on a couple of weekends. Did a bit of research and there's actua…

> Mostly I've come around to the fact that static typing isn't as bad as my young self thought That's not exactly a point for Java though, considering it doesn't really have a good static type system.

Could you define good?

Re: Modern Java – A Guide to Java 8

#43
post #17

> maps don't support streams This is very misleading. There is not a #stream method on Map because Map supports three different streams: map.keySet().stream() map.values().stream() map.entrySet().stream()

Furthermore, Maps have a .forEach method

m.forEach((key, value) -> System.out.println("key: " + key + " value: " + value));

Re: Modern Java – A Guide to Java 8

#46

interfaces with default implementations? Doesn't this look like... multiple inheritance?

You can still not have member variables, so the default implementations can only be implemented in terms of other methods. So it should probably be classified as 'limited multiple inheritance'. It does have the diamond problem though.

Re: Modern Java – A Guide to Java 8

#49

Earlier quoted context omitted.

It may not be modern computer science, but it is modern Java. This post is about modern Java and explains the new (in v8) features very well. What's your problem?

OK, what then is Java The point was that if one has a proper old-school computer science (to realize the crucial importance of first class procedures and the power of uniformity 20 years ago) all these modern features are coming for free, to which the code above is an illustration. But who cares. There is a whole industry which praised Java for almost two decades even without these "modern features". Any PL student o…

Yes, and now that Java finally has these modern features: people are migrating to GO who lack many :(

But then LISPs have always been shunned for bad reasons. While crazy bad languages like C,Java and PHP are picked up by the masses.

Post reply on HN