TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Month With Scala

51 点作者 fogus超过 13 年前

4 条评论

dustingetz超过 13 年前
the technical stuff (fragile versions and bytecode, etc) is being worked on by Typesafe, the venture-funded company backing scala and ideally will improve. so, i thought this was the most interesting part:<p><i>"By most measures, Scala is not a simple language to learn. While there are lots of languages that are large in scope and features, most can be learned over time. Scala fall short by requiring you to learn at least 75% before you can do anything meaningful. When I first started out with some basic scripting this didn’t appear to be the case, however; once I tackled a real project, I realized how limited my knowledge really was. For those that think you’ll coast by because you’re a Java expert, think again. My Java knowledge is extensive and the parallels between the language are few and far between."</i><p>part of me wonders if this is inevitable, and a good thing. many problems don't require expert tools and expert teams. joe blo can write a blog on appengine, and you can throw a bunch of college hire "consultants" on many business apps and be successful. Competence is relative. As problems get more complex (see Why Is Payroll Hard[1]) you need more expert teams and more expert tools, your average enterprise java team of people who work 9-5, have a nice family and a powerboat hobby (but perfectly competent, by most standards!), can no longer successfully manage the complexity. Maybe they can't grasp scala, maybe they just aren't interested in grasping scala. But there is a set of problems which you need experts to solve, and experts want sharper tools. like git, a macbook, and not-java.<p>I think Scala might end up like Javascript -- it has good parts, and it has bad parts. but in the hands of experts, allows us to accomplish things which are otherwise out of reach. this hits home for me personally -- i can create elegant functional solutions to problems that I just struggle to tame with traditional java-OOP[2].<p>[1] <a href="http://c2.com/cgi/wiki?WhyIsPayrollHard" rel="nofollow">http://c2.com/cgi/wiki?WhyIsPayrollHard</a> [2] which is, you know, how people get turned on to FP in the first place. "you don't find it, it finds you"
SWengineer超过 13 年前
A good post, recommending the use of Scala. I do agree with his point about the differences between scala collections and java ones. Interfacing with java libs which return java collections often requires conversions to scala collections before I can use the full power of scala. That said I'd still pick Scala any day of the week. The Scala book he references is surprisingly good, I bought it recently.
评论 #3334075 未加载
donjigweed超过 13 年前
"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."<p>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?<p>"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."<p>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.<p>"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."<p>Good thing actually compiling is not a frequent and crucial behavior in the development process otherwise these little quirks might really slow things down.<p>"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."<p>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?
评论 #3337418 未加载
salimmadjd超过 13 年前
So what I do not understand, if the goal is to stay with java and leverage their background, but wanting something less laborious to code. Then why not try Groovy? Seems to me anyone now wants to do Scala just to put it on their resumes.
评论 #3335442 未加载
评论 #3335464 未加载