原文地址:
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.
分享到:
相关推荐
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
log凑字数 12345678910
【毕业设计】java+springboot+vue电影评论网站系统设计与实现(完整前后端+mysql+说明文档+LunW).zip
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
双向全桥LLC谐振变换器与非对称拓扑的双向模型仿真研究:正向LLC与反向LC的变频控制闭环模型在Matlab Simulink及PLECS环境下的应用,双向全桥LLC谐振变换器:非对称拓扑与双向模型的Matlab Simulink及PLECS仿真研究,双向全桥LLC谐振变器仿真,非对称拓扑,双向模型 正向LLC,反向LC 采用变频控制的闭环模型 运行环境包括matlab simulink,plecs等 ~ ,双向全桥LLC谐振变换器仿真; 非对称拓扑; 双向模型; 变频控制; Matlab Simulink; PLECS。,双向全桥LLC谐振变换器仿真研究:非对称拓扑与变频控制模型
Jordan标准型行列互逆方法-程序求解
目前,在复杂任务(如Spider数据集上的文本到SQL转换)中,使用大型语言模型(LLMs)的微调模型和提示方法之间存在显著差距。为了提高LLMs在推理过程中的性能,我们研究了将任务分解为较小子任务的有效性。特别是,我们展示了将生成问题分解为子问题,并将这些子问题的解决方案输入给LLMs,可以显著提高其性能。我们的实验表明,这种方法使三个LLMs的简单少样本性能提高了大约10%,使其准确性接近或超过最先进水平(SOTA)。在Spider数据集的保留测试集中,以执行准确率为衡量标准,最先进水平是79.9,而使用我们方法的新最先进水平为85.3。我们的方法在上下文中学习,比许多经过深度微调的模型高出至少5%。此外,在BIRD基准测试中,我们的方法实现了55.9%的执行准确率,创下了该基准测试保留测试集的新最先进水平
程序可以参考,非常好的思路建设,完美!
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
# 基于FreeRTOS的ARM926EJS实验系统 ## 项目简介 本项目将FreeRTOS移植到基于ARM926EJ S CPU的ARM Versatile Platform Baseboard上,当前版本基于FreeRTOS 10.4.0,后续会随FreeRTOS新版本发布而更新。项目处于早期开发阶段,包含基础的演示任务,可用于学习和研究实时操作系统的基本功能与应用。 ## 项目的主要特性和功能 1. FreeRTOS内核移植实现FreeRTOS内核在ARM926EJ S架构上的移植,支持任务管理、信号量、队列、事件标志、互斥量等功能。 2. 中断处理具备中断服务例行程序,能处理中断事件并切换任务。 3. 任务切换有任务切换机制,支持手动切换和定时器中断切换。 4. 定时器管理可进行定时器的创建、启动、停止、查询等操作。 5. 内存管理实现动态内存分配与释放,支持运行时动态操作。
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
基于MATLAB Simulink R2015b的三电平中性点钳位(NPC)逆变器高级仿真模型,基于MATLAB Simulink R2015b的三电平中性点钳位(NPC)逆变器高级仿真模型,Three_Level_NPC_Inverter:基于MATLAB Simulink的三电平中性点钳位(NPC)逆变器仿真模型。 仿真条件:MATLAB Simulink R2015b,拿后前如需转成低版本格式请提前告知,谢谢。 ,核心关键词:Three_Level_NPC_Inverter; MATLAB Simulink; 仿真模型; R2015b版本。,基于MATLAB Simulink的三电平NPC逆变器仿真模型(R2015b版)
CSDN Matlab武动乾坤上传的资料均是完整代码运行出的仿真结果图,可见完整代码亲测可用,适合小白; 1、完整的代码内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主或扫描博客文章底部QQ名片; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
graph_searcher 机器人路径搜索
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
基于Matlab 2018版的三环PI参数自整定永磁同步电机伺服控制仿真模型:FOC矢量控制与PI参数调整的实践指南,好的,根据您提供的文字,我为您提炼出的标题为: 永磁同步电机伺服控制仿真:三环PI参数自整定Matlab模型构建及应用解析 这个标题满足了您的要求,既涵盖了主题“永磁同步电机伺服控制仿真三环PI参数自整定”,又提到了Matlab仿真模型的应用和解析,同时符合字数要求。,永磁同步电机伺服控制仿真三环PI参数自整定 永磁同步电机伺服控制仿真三环PI参数自整定 Matlab仿真模型 模型基于matlab 2018版本搭建。 模型适合伺服控制仿真初学者或工程师,学习电机控制中的PI参数调整问题。 模型包含如下内容: 1.FOC矢量控制算法,svpwm调制算法和永磁同步电机模型。 2.三环控制包含位置环、转速环、电流环;其中位置环采用P+前馈的复合控制;转速环采用PI控制;电流环采用PI控制+前馈解耦算法。 3.模型中只需要输入电机的电阻、电感、转动惯量等参数,就可以自动计算PI参数,实现比较好的控制效果。 4.提供相关参考lunwen和说明文档,方便读者进行学习。 ,核心