Live data from Hacker News

Modern Java – A Guide to Java 8

github.com

21–30 of 203 posts

Re: Modern Java – A Guide to Java 8

#21

I personally jumped right into Clojure on the jvm without much Java experience. I've found it to be awesome. Is there a non-political reason that someone should choose Java over Clojure (or possibly Scala)? Where does Java shine?

Java EE is currently an excellent framework for complex distributed enterprise applications.

Re: Modern Java – A Guide to Java 8

#22
Sorry, I absolutely cannot stand this "modern" meme.

  (define-syntax stream-cons
      (syntax-rules ()
          ((_ x xs)
              (cons x (delay xs)))))

  (define (stream-cdr xs)
      (force (cdr xs)))

  (define (stream-map f xs)
      (stream-cons (f (car xs)) (stream-map f (stream-cdr xs))))

  (define (stream-filter f xs)
      (if (f (car xs))
          (stream-cons (car xs) (stream-filter f (stream-cdr xs)))
          (stream-filter f (stream-cdr xs))))

  (define (stream-take n xs)
      (if (
Not mentioning all these different flavors of Common Lisp streams packages.

As for other features, Scala is around for almost a decade.

Re: Modern Java – A Guide to Java 8

#23

Sorry, I absolutely cannot stand this "modern" meme. (define-syntax stream-cons (syntax-rules () ((_ x xs) (cons x (delay xs))))) (define (stream-cdr xs) (force (cdr xs))) (define (stream-map f xs) (stream-cons (f (car xs)) (stream-map f (stream-cdr xs)))) (define (stream-filter f xs) (if (f (car xs)) (stream-cons (car xs) (stream-filter f (stream-cdr xs))) (stream-filter f (stream-cdr xs)))) (define (stream-take n x…

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?

Re: Modern Java – A Guide to Java 8

#24
post #15

This is a really nice overview of the new Java 8 features. I like how this tutorial communicates mostly with code snippets and has "read more" links for most topics. If you are using Java and have not tried Lambda Expressions, method references and default methods, do so now! After that, you'll think "How was I able to live without that?". I also think that the way Java integrates lambda expressions (via functional i…

Modern here obviously doesn't mean "Java is modern", but rather "the modern form of Java"

Re: Modern Java – A Guide to Java 8

#25
post #15

This is a really nice overview of the new Java 8 features. I like how this tutorial communicates mostly with code snippets and has "read more" links for most topics. If you are using Java and have not tried Lambda Expressions, method references and default methods, do so now! After that, you'll think "How was I able to live without that?". I also think that the way Java integrates lambda expressions (via functional i…

If you are using Java and have not tried Lambda Expressions, method references and default methods, do so now! After that, you'll think "How was I able to live without that?"

I think instead of "How was I able to live without that?", people are more likely to exclaim "about time!"

Re: Modern Java – A Guide to Java 8

#26
post #18

I personally jumped right into Clojure on the jvm without much Java experience. I've found it to be awesome. Is there a non-political reason that someone should choose Java over Clojure (or possibly Scala)? Where does Java shine?

All IME, and as a Scala fan: Clojure has a weakly integrated type system (an inherent disadvantage of optional type systems). At the simplest level this makes silly errors much easier and means you have to write more tests to maintain the same defect rate. The lack of types mean you require extensive use of macros for advanced functionality. IME macros have major maintainability issues in a multi-person codebase. Bot…

What do you think is not quite right about errors in tranducers? When you use them with core.async channels you can supply an optional exception handler, which is quite nice.

In terms IDEs, Cursive for IntelliJ is great, and it gives almost Java-like capabilities (with limitations inherent to more dynamic languages, of course).

Re: Modern Java – A Guide to Java 8

#27

I personally jumped right into Clojure on the jvm without much Java experience. I've found it to be awesome. Is there a non-political reason that someone should choose Java over Clojure (or possibly Scala)? Where does Java shine?

It is the systems programming language of the Java platform, if you see the JVM as an OS.

So you need to be comfortable with it, as there will always be cases you need to jump out of the alternative language into Java.

Also, most companies will only hire to work with Java on the JVM, because they don't want to be hostage of the cool language some of the dev team guys/contractors decided to use instead.

It is very rare to see traditional Java shops to use alternative languages.

Usually the ones using them are either startups or companies like Facebook and Twitter, which aren't the typical business culture.

Re: Modern Java – A Guide to Java 8

#28
post #25
post #15

This is a really nice overview of the new Java 8 features. I like how this tutorial communicates mostly with code snippets and has "read more" links for most topics. If you are using Java and have not tried Lambda Expressions, method references and default methods, do so now! After that, you'll think "How was I able to live without that?". I also think that the way Java integrates lambda expressions (via functional i…

If you are using Java and have not tried Lambda Expressions, method references and default methods, do so now! After that, you'll think "How was I able to live without that?" I think instead of "How was I able to live without that?", people are more likely to exclaim "about time!"

Yep, somewhere at Xerox PARC in the early 80's

    coll := ((1 to: 100) select: [:x| ( x * x ) > 3]) collect: [:x | (x * 2)].

Re: Modern Java – A Guide to Java 8

#29
post #24
post #15

This is a really nice overview of the new Java 8 features. I like how this tutorial communicates mostly with code snippets and has "read more" links for most topics. If you are using Java and have not tried Lambda Expressions, method references and default methods, do so now! After that, you'll think "How was I able to live without that?". I also think that the way Java integrates lambda expressions (via functional i…

Modern here obviously doesn't mean "Java is modern", but rather "the modern form of Java"

Did you intend to answer to my comment? I never used the word "modern" :)

Re: Modern Java – A Guide to Java 8

#30
post #18

I personally jumped right into Clojure on the jvm without much Java experience. I've found it to be awesome. Is there a non-political reason that someone should choose Java over Clojure (or possibly Scala)? Where does Java shine?

All IME, and as a Scala fan: Clojure has a weakly integrated type system (an inherent disadvantage of optional type systems). At the simplest level this makes silly errors much easier and means you have to write more tests to maintain the same defect rate. The lack of types mean you require extensive use of macros for advanced functionality. IME macros have major maintainability issues in a multi-person codebase. Bot…

> IME macros have major maintainability issues in a multi-person codebase.

I have heard this a bunch, and I believe it, but I've never personally had an opportunity to use a language that supports macros for a multi-person codebase. I'd be interested to learn what are some of the pitfalls you've seen, if you don't mind sharing.

Post reply on HN