Swift 与 Scala 对比:30项指标

Swift 对比 Scala

Swift

Swift 是一种Object-Oriented, Functional编程语言,首次出现于 2014 年,由 Apple 设计。主要应用场景:Mobile Apps, Cross-Platform Development。

Scala

Scala 是一种Object-Oriented, Functional编程语言,首次出现于 2004 年,由 Martin Odersky 设计。主要应用场景:Backend Services, Enterprise Applications, Android。

30项指标

指标SwiftScala
GitHub Stars5529155399
Stack Overflow Tags732460668243
TIOBE Rank2349
RedMonk Rank2451
PYPL Rank3356
Average Salary (USD)119941108106
Job Postings3642132694
Benchmarks Score0.990.77
Learning CurveHardHard
Community SizeLargeLarge
Documentation Quality89
Ecosystem Maturity99
Industry Adoption89
Type System Complexity107
Concurrency Support104
Performance - Execution Speed106
Performance - Memory Usage105
Performance - Startup Time96
Tooling Quality99
Package Manager Quality99
IDE Support99
Debugging Experience109
GitHub Stars Rank2625
Stack Overflow Tags Rank2432
Average Salary Rank2541
Job Postings Rank2435
Benchmarks Rank636
Learning Curve Score14
Community Size Score88
AHP Score7.867.17

AHP综合评分

  • Swift: 7.86 (#20)
  • Scala: 7.17 (#30)
Swift           | ######## 7.86
Scala           | ####### 7.17

何时选择Swift

Mobile Apps, Cross-Platform Development. Swift 是一种Object-Oriented, Functional编程语言,首次出现于 2014 年,由 Apple 设计。主要应用场景:Mobile Apps, Cross-Platform Development。

何时选择Scala

Backend Services, Enterprise Applications, Android. Scala 是一种Object-Oriented, Functional编程语言,首次出现于 2004 年,由 Martin Odersky 设计。主要应用场景:Backend Services, Enterprise Applications, Android。

Hello World 示例

Swift:

print("Hello, World!")

Scala:

object Main extends App { println("Hello, World!") }

Other languages