News for hackers. Stuff that matters.
Re:Modern Java – A Guide to Java 8 by lmm on Monday November 16, 2015 @06:30AM (#10573839)
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.

Both these things are major disadvantages for automatic comprehensibility of code. Autocompletion can be more-or-less usable but will never be as good as in Java or Scala. Automated refactoring is inherently unsafe in the presence of macros (Scala's fancier typed constructs (typeclasses, for/yield with custom types) mean you need macros much less often; Java tends to force you to expand these things out by hand (or else use annotations which act as de facto macros), which has its own maintainability issues but does at least mean automated refactoring will work correctly).

Some of the language culture pushes people towards less principled abstractions. From this side of the fence that looks like anti-intellectualism; no doubt from their side it's pretension on typed programmers' part. But either way I think they're setting themselves up for long-term maintainability issues (e.g. the semantics of clojure transducers in the presence of errors are infuriatingly not-quite-right, which will either remain a painful gotcha forever, or necessitate a painful migration in the future).

As a minority language Clojure may not be as well supported in the surrounding ecosystem - partly things like IDEs but also code coverage tools, profilers, monitoring.... Remember the JVM ecosystem is wider than just the languages themselves.

There are good things about Clojure, but it's by no means clear-cut.

Re:Modern Java – A Guide to Java 8 by cageface on Monday November 16, 2015 @07:49AM (#10574088)
A while ago I decided to teach myself how the common machine learning algorithms worked and, to make things interesting, decided to implement them in parallel in both Clojure and Scala. I expected Clojure to be a better fit for this since Lisp has historically been strong in AI. But I found as my codebase grew that the Scala code was much easier to maintain, refactor and understand. So these days I am a big fan of static typing provided it's in the form of a sufficiently expressive type system (Scala, Ocaml, Haskell, Swift etc).

Lisp got a lot of things right but I'm not sure dynamic typing and s-expression syntax were among them.

Re:Modern Java – A Guide to Java 8 by ubertaco on Monday November 16, 2015 @07:27AM (#10574000)
> 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.

Re:Modern Java – A Guide to Java 8 by lmm on Monday November 16, 2015 @07:48AM (#10574084)
It's not like I have a lot of experience (macros are much rarer in my primary language, Scala). But it's usually just someone doing a refactor that "makes sense" according to the logic of the regular language but not within the macro. A lot of it is simple, "silly" things like trying to extract a repeated piece of logic into a method call, only it doesn't work because the logic uses something the macro hooks into, or just is transformed in a surprising way by the macro that makes the reasoning incorrect. To take a completely trivial real-world example, renaming a field is usually a safe operation that you can do automatically (with an IDE) without even testing, but if that field's used in a macro then maybe it represents a key in a JSON object and you've just broken your web API. You notice it pretty quickly, and it's a two-minute fix - but these kind of "thousand cuts" scenarios really slow development. Outright production failures are less common but I've seen those when test coverage was poor or other failures interacted.
Re:Modern Java – A Guide to Java 8 by raspasov on Monday November 16, 2015 @07:19AM (#10573974)
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 by lmm on Monday November 16, 2015 @07:52AM (#10574098)
I forget the exact behaviour, and maybe it's been improved. But I remember that it didn't map cleanly onto values - sometimes you want to continue after a single error, sometimes you want to bail out immediately, and the ways of doing this felt very ad-hoc.
Re:Modern Java – A Guide to Java 8 by raspasov on Monday November 16, 2015 @11:37AM (#10575383)
I think you can do what you are describing with a channel https://clojure.github.io/core.async/#clojure.core.async/cha...
Re:Modern Java – A Guide to Java 8 by jvz on Monday November 16, 2015 @07:21PM (#10578330)
> The lack of types mean you require extensive use of macros for advanced functionality.

Could you elaborate?

Re:Modern Java – A Guide to Java 8 by lmm on Tuesday November 17, 2015 @03:04AM (#10579771)
A lot of things that can be implemented natively in scala using its fancy type system would likely be done with macros in clojure. E.g. scala-arm, treelog, dependency injection (not that I use it), database transaction management. Or even just async.