5 ms·
Agreed. The problem with Clojure and Scala is that they naturally target Java developers, due to their dependence on the JVM and tight integration with existin
by flatline 11y ago
Agreed. The problem with Clojure and Scala is that they naturally target Java developers, due to their dependence on the JVM and tight integration with existing Java libraries. Companies choose Java for, among other things, the relatively simple syntax and ubiquity of Java developers. This is not a group that is, as a group, longing for change, for something new and more expressive. Java's selling points are static typing, corporate backing, large-scale adoption, memory safety, verboseness, and write-once-run-anywhere. Clojure gets rid of static typing and you can easily write completely opaque, unreadable code in Scala[0]. They are DOA in most large organizations off the bat for these reasons. And for someone looking for native compilation or predictable memory management, they are also off the table.
[0] http://blog.fogus.me/2009/03/26/baysick-a-scala-dsl-implementing-basic/ http://blog.fogus.me/2009/03/26/baysick-a-scala-dsl-implemen...
- the_af 11y agoReally? Your example of "unreadable" Scala code is a DSL specifically designed to look like BASIC, complete with line numbers? Have you taken a look at the source code? It's extremely simple, short and easy to understand. It even says so in the blog post you linked to. The only way I can figure someone not understanding it is if they think "these don't look like Java keywords, I give up!". Also, I don't know about Clojure, but Scala isn't DOA in large organizations.
- flatline 11y agoMy point being, Scala is a powerful and expressive language in which you can write something like a basic DSL. I personally think this is great, but a lot of Java secs will take one look at that level of flexibility and faint when trying to imagine a group of 10 developers of wildly varying ability and experience trying to manage a large code base with a language like this. Really, I've tried to introduce Scala in Java teams before, and was surprised at the pushback over just the concept of a different language running on the JVM. Groovy is apparently an exception, but I have not seen it used as the primary language over Java.
- the_af 11y agoYes, but you picked an example which is extremely easy to understand, on multiple levels. The Basic DSL is trivial. The Scala implementation is short and simple (don't trust me, take a look, assuming you're passingly familiar with Scala!). Is your argument against DSLs in general? You don't need to write them at all if you don't want to. In fact, most Scala devs don't write DSLs. So is your argument "the Java devs I worked with were afraid of languages with unfamiliar syntaxes"? Um. It's hard to argue with that. I don't know what to say, other than "some of the Java devs I currently work with embrace and love Scala, and others don't". Maybe change jobs and go work with more open-minded people?
- pluma 11y agoNot sure why this is being downvoted. Even ClojureScript (which has JavaScript as a compilation target) runs on a JVM-based compiler and requires some buy-in into the greater Java ecosystem. Plus it is built around the Google Closure ecosystem which makes it largely incompatible with large parts of the modern JS ecosystem built around node (though there are ways to tap into these from CLJS but not vice versa). Java itself is a very conservative programming language. It is getting new language features as new releases come out but it's very much not on the "bleeding edge" as language trends go. Its main target audience are big enterprises that need a reliable platform with a large market of competent developers (with qualifications available in the form of various well-established certifications). That doesn't mean you can't do anything "cool" in Java or that there can't be any startup that starts out on Java, but it means the acceptance of non-Java JVM languages is a non-issue. That these companies already use the JVM as a platform just makes other JVM-based languages slightly more palatable.
- the_af 11y agoThe gist of flatline's post isn't necessarily wrong, but you must admit 2 out of 2 wrong assertions about Scala isn't a good sign.