3 ms·
"First off let’s talk about why I chose Scala in the first place. After spending a good deal of my last year entrenched in JavaScript and appreciating its funct
by donjigweed 15y ago
"First off let’s talk about why I chose Scala in the first place. After spending a good deal of my last year entrenched in JavaScript and appreciating its functional nature, brevity and flexibility, writing Java code became a tremendous chore for me. At the same time, our developers have grown accustomed to, and appreciative of the wide array of quality frameworks and tools available for Java, so a drastic departure was out of the question. This left us with two viable options: Clojure, and Scala."
Yes, a dynamically typed, functional lang like Javascript can be quite liberating after working predominantly in Java. But is the replacement of anonymous inner classes and traditional loops with closures really that important? And moving to Scala does not constitute a "drastic departure?" Really?
"Simply put, this is the main reason for my departure from Java. I fell in love with having Functions as first class members in JavaScript and it pained me to work without them in Java. Coupled with other functional niceties like currying, partially applied functions, etc. it improves code re-use and drastically accelerates development."
Really. Drastically accelerates development. Sounds suspiciously like he found himself a Silver Bullet. And of course all of the little hiccups along the way that come with moving to a new(ish), less mature platform don't slow down development at all.
"While the Scala compiler invoked through a builder like Maven, or the command line provides workarounds for this, IDE’s such as Eclipse and NetBeans don’t fare as well. Although the Eclipse Scala plugin is supposed to support Joint Compilation out of the box, this has not been my experience thus far. As long as your not married to Eclipse, I’ve heard IntelliJ and Buildr are the best IDE’s for Scala development so you may want to opt for one those if going the Scala route."
Good thing actually compiling is not a frequent and crucial behavior in the development process otherwise these little quirks might really slow things down.
"In my case, I use Java for Servlets and REST via Jersey with the service and data access layers provided by Scala. This way Scala never has to call Java."
LOL. You know, because Hibernate or JdbcTemplate are just too gnarly to deal with. We need the brevity of Scala here! And a functional model for our service layer! Really, maybe if the guy was doing some highly concurrent app and was making the argument that Scala's Actor model greatly simplified things, that might be a plausible justification. But for some service and dao classes? Seriously? How do people justify these decisions with a straight face?
- moomin 15y agoI'm not that familiar with Scala, but I have done some significant Clojure work, and I can assure you, the difference between inner classes and closures is significant. Having used C# for many years, it's notable that people started to use closures vastly more after Microsoft improved the syntax. And yes, Hibernate really is that gnarly. Imlementing a rest/Jason interface in Clojure is vastly easier, never mind simpler.