总结:两者都是非常重要的语言。最好的两者都学一下。scala虽然被称为下一代java,但是clojure的思想非常好的。
http://stackoverflow.com/questions/1506728/on-performance-and-java-interoperability-clojure-vs-scala
I think either language will be fast enough for you. When comparing Python and Java, it seems a bit unreasonable to blame the language for the speed difference. Java is compiled JIT (except on mobile devices) whereas Python is interpreted. Just because both use a bytecode does not mean the implementations will have even remotely comparable performance. But both Scala and Clojure are JVM languages so they should have similar performance.
Scala has a few implementation advantages over Clojure and I would expect somewhat higher performance. Although Scala's static typing would normally translate into a speed advantage over Clojure's duck typing, Clojure does support type hinting which can speed up code considerably. Possibly, ordinary Scala is faster than ordinary Clojure, but you only need to optimize the bottlenecks. Most of a program's run time is generated by a small amount of the actual code.
Regarding interop w/ Java, Scala is closer to Java but I'm sure both languages interoperate well. In Programming Clojure Stuart Halloway writes: "[you can access] anything you could reach from Java code.".
And since Scala author Martin Odersky wrote Sun's Java compiler, I kinda think no balls have been dropped on the Scala side, either. :-)
You would be hard-pressed to pick two better languages, though I like Ruby also. Why are you worried about which one to try? Why not try them both? Scala is more likely to be "the next Java", while it's hard to imagine that Lisp will finally take off after not doing so for over 50 years. But it's clear that Lisp is on its own unique level of abstraction, and Clojure is fairly simple, so Scala + Clojure won't be that much harder than just (the rather complex) Scala and I'm sure you will be glad you did it.
And for that matter they interoperate...
分享到:
相关推荐
Scala与Clojure都是运行在Java虚拟机(JVM)上的语言,它们都支持函数式编程范式。Scala是一种多范式的编程语言,提供了面向对象和函数式编程的特性。Clojure是一种Lisp方言,同样运行在JVM上,它拥有丰富的函数式...
StackOverflow刚刚发布了2015开发者调查,最受程序员喜爱的开发语言中,Clojure和Scala分别位列第五和第六。排名第一的是Swift,而Swift相比原先的Objective-C最重要的优点之一,就是对函数式编程提供了更好的支持。...
Scala和Clojure都是现代函数式编程语言,它们都运行在Java虚拟机(JVM)上,能够利用Java的生态系统和资源。Scala是一种多范式语言,结合了面向对象和函数式编程的特点,提供了强大的类型系统和模式匹配功能。...
Use Scala and Clojure to solve in-depth problems with two sets of patterns: object-oriented patterns that become more concise with functional programming, and natively functional patterns. Your code ...
本书《功能编程模式在Scala和Clojure中的应用》不仅为读者提供了从OOP到FP的重要指导,还深入探讨了两种语言中功能编程的关键概念和技术。无论是对Scala还是Clojure感兴趣的新手,还是希望扩展自己编程技能集的经验...
Functional Programming Patterns in Scala and Clojure 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Functional Programming Patterns in Scala and Clojure 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络...
读书笔记:Scala与Clojure函数式编程模式Java虚拟机高效编程 >源码
读书笔记:《Scala与Clojure函数式编程模式Java虚拟机高效编程》学习代码记录
本书向读者展示了如何采用函数式方案来替代或简化面向对象编程中使用的诸多通用模式,同时还介绍了一些在函数式世界中广泛使用的模式。
@dpp 的 QCon 北京 Scala/Clojure preso Scala 和 Clojure 玩得很好 包含: 介绍 显示JS 演示中使用的图像 本 preso 根据知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议获得许可。 要查看此许可证的...
Functional Programming Patterns in Scala and Clojure
MSUDenver_Projects 学校项目的集合,包括Java,Scala和Clojure。 ComputerOrginazition2:使用ARM汇编语言的项目。 ComputerScience1:Java项目,用于学习Java和计算机科学原理的基本实现。 ComputerScience2:Java...
当前有Java,Scala和Clojure实现。欢迎PR,例如其他语言的改进和实现! 每种语言的版本 Java 14 Scala2.13.3 Clojure 1.10.2 规格 本地主机:8080侦听,接收HTTP请求,返回HTTP响应 相应的HTTP请求方法仅是GET ...
这是Scala,Clojure和Java中Quick Sort,Merge Sort和Bubble Sort的实现。 它旨在比较每种语言的编程难易程度,编码风格和效率。 应该注意的是,在执行此测试之前,我对Java的了解比对Scala或Clojure的了解要多,...
《Scala与Clojure函数式编程模式:Java虚拟机高效编程》是针对Java开发者深入理解函数式编程和优化JVM性能的一份珍贵资源。这个压缩包`mbfpp-code-master`包含的是作者对这两种语言在Java虚拟机(JVM)上实践的源...
[2013] Functional Programming Patterns in Scala and Clojure - Write Lean Programs for the JVM.(Michael Bevilacqua-Linn).[1937785475].pdf+epub.rar [2014] Clojure Cookbook - Recipes for Functional ...
Clojure 与 Scala 的高性能 Web API Clojure 和 Scala 实现 Web API 的比较。 表中的内容 TL; 博士 Scala 和 Clojure 在 JVM 上运行并竞争 Java 的替代品。 Clojure 获胜是因为: Scala 函数式 + 面向对象 + 演员 ...
java / scala / clojure Maven模板 mvn clean package for class in JMain SMain CMain do java -cp target/template-0.0.1-SNAPSHOT-jar-with-dependencies.jar com.github.sorhus.template. $class done Hello...