原文地址:
http://www.artima.com/scalazine/articles/a_business_case_for_new_languages.html
Scalazine
A Business Case for New Languages
The Benefits of Adopting Scala over Java
by Dianne Marsh
April 15, 2011
ADVERTISEMENT
Summary
Unsure about when to adopt a new technology? Do you think your old technology is "safer"? Maybe ... or perhaps sticking with it offers risks of its own. This article discusses some of the benefits of adopting Scala rather than staying with Java.
At SRT Solutions, we promote the use of new technologies and languages with many of our customers. One question that business decision makers often ask is, "Why should my developers learn and use a new technology? We have a language that works. They all know it, and we're delivering on that platform. Why waste time and money having them learn a new language?"
It's true. You do have a language that works, one that you know and are comfortable with. Why not keep using it?
Let's make some analogies with automotive manufacturing. I am from Michigan, after all!
Java was first introduced over fifteen years ago. Many applications are still built using these languages. They're shiny, new applications. But they are held back by decades-old decisions. The styling is a bit outdated, as is the way that you interact with them.
Automotive manufacturers could choose to build cars using decades-old engines and transmissions, cigarette lighters and other things that seemed important in the past. But, much like your software program, the car would be shiny and new, but with 90's styling and (worse yet) bad fuel efficiencies. To follow our analogy a bit further, we would also restrict them to the tools that they could buy in the 90's, allowing for updates only where the new tools would also work on the old systems.
The automotive manufacturers don't build cars like that, and we shouldn't build software with decades-old programming languages either. Innovations that didn't worry about backward compatibility have given us hybrids as well as electric-only cars. We're seeing fuel efficiencies that were claimed impossible ten years ago. And manufacturers are using tools for building cars that allow them to get the cars to market faster, and less expensively than they could in the past.
That same magnitude of innovation is available in software. By choosing a modern programming language, like Scala, your developers can deliver your application sooner and at less cost. Concise languages like Scala allow programmers to focus on the core logic, leaving out the boilerplate. Less code makes the intent of the programmer more obvious, and the resulting code is easier to understand. Clearer, cleaner code is easier to debug, and makes it easier to avoid errors in the first place.
Combining Scala with modern testing tools, like ScalaTest, provides more clarity around what the program does, reducing the likelihood for discovering problems in production. The language runs on a familiar platform (the Java Virtual Machine), much like the cars of today run on our highway system.
If you're worried about your existing investment in Java, don't. Scala and Java can co-exist. You can call your existing Java libraries from Scala, and the new Scala that you write can call the new code that you're going to write in Scala.
But wait, what about Java 7? Yes, Java 7 is due to release this year. But Scala already provides most of what will be provided in Java 7 along with many other enhancements. There's no reason to wait. Choose Scala now, and view Java 7 as a maintenance release for code already written.
Another concern, often raised by the business folks, is about the development team and their ability to learn a new language. If you have a self-motivated team, they're probably already excited about learning a new language. And, while they're transitioning, they will be able to write Java-like code using Scala. So, let's move on and write new code in Scala and reap the benefits of writing less code and delivering more software.
Share your opinion
Have a question or opinion about using Scala in your company? Discuss this article in the Articles Forum topic, A Business Case for New Languages.
Resources
Scala can be found at:
http://www.scala-lang.org/
ScalaTest can be found at:
http://www.scalatest.org/
SRT Solutions can be found at:
http://www.srtsolutions.com/
About the author
Dianne Marsh is co-founder of SRT Solutions, an Ann Arbor, Michigan custom software development firm that specializes in using newer technologies to deliver software effectively, while writing less code. Dianne is also active in CodeMash and various Java user groups. She earned her Master of Science degree in computer science from Michigan Technological University.
分享到:
相关推荐
Scala-IDE(for Eclipse Juno Scala 2.9)
Learn Scala is split into four parts: a tour of Scala, a comparison between Java and Scala, Scala-specific features and functional programming idioms, and finally a discussion about adopting Scala in...
Scala and Spark for Big Data Analytics by Md. Rezaul Karim English | 25 July 2017 | ISBN: 1785280848 | ASIN: B072J4L8FQ | 898 Pages | AZW3 | 20.56 MB Harness the power of Scala to program Spark and ...
(OOP) paradigm provides a whole new layer of abstraction. In short, this chapter discusses some of the greatest strengths of OOP languages: discoverability, modularity, and extensibility. In ...
Scala for the Impatient.pdf Scala for the Impatient.pdf
scala for data science
Scala is a modern programming language for the Java Virtual Machine (JVM) that combines the best features of object-oriented and functional programming languages. Using Scala, you can write programs ...
Scala embraces the functional programming style without abandoning object orienta- tion, giving you an incremental learning path to a new paradigm. The Scala in- terpreter lets you run quick ...
数据科学经典入门教程Scala for Data Science,大数据基础
Functional Programming in Scala is a serious tutorial for programmers looking to learn FP and apply it to the everyday business of coding. The book guides readers from basic techniques to advanced ...
Mastering Play Framework for Scala
scala 2.11.0 M8 for linux。 Scala combines object-oriented and functional programming in one concise, high-level language. Scala's static types help avoid bugs in complex applications, and its JVM and...
scala-2.11.8源码,用于关联bin文件;查看源码的必备东西,拿走不谢;可是不能不选,就少选点吧。
采用Scala编写高效程序,实现快速又高效的机器学习算法
Scala for the Impatient是Scala 入门书籍,资源为英文版的。
Scala for Machine Learning(2nd)_Code 源码 第2版 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Build classes that compose one or more traits for full reusability, or create new functionality by mixing them in at instantiation Table of Contents Part I. Core Scala Chapter 1. Getting Started With...
Programming in Scala is the definitive book on Scala, the new language for the Java Platform that blends object-oriented and functional programming concepts into a unique and powerful tool for ...
Scala_API_For_2.7.6
Scala will be a valuable tool to have on hand during your data science journey for everything from data cleaning to cutting-edge machine learning About This Book • Build data science and data ...