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?
Modern Java – A Guide to Java 8
21–30 of 203 posts
Re: Modern Java – A Guide to Java 8
#22 (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
#23Sorry, 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…
Re: Modern Java – A Guide to Java 8
#24This 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…
Re: Modern Java – A Guide to Java 8
#25This 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…
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
#26I 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…
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
#27I 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?
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
#28This 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!"
coll := ((1 to: 100) select: [:x| ( x * x ) > 3]) collect: [:x | (x * 2)].Re: Modern Java – A Guide to Java 8
#29This 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
#30I 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…
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.