Lua 与 C 对比:30项指标

Lua 对比 C

Lua

Lua 是一种Procedural, Object-Oriented编程语言,首次出现于 1993 年,由 PUC-Rio 设计。主要应用场景:Automation, Scripting, DevOps。

C

C 是一种Procedural, Object-Oriented, Generic编程语言,首次出现于 1972 年,由 Dennis Ritchie 设计。主要应用场景:Systems Programming, Embedded, Performance-Critical Applications。

30项指标

指标 Lua C
GitHub Stars 47699 61804
Stack Overflow Tags 587525 860669
TIOBE Rank 55 6
RedMonk Rank 56 11
PYPL Rank 59 8
Average Salary (USD) 106277 132367
Job Postings 28319 41524
Benchmarks Score 0.81 0.83
Learning Curve Hard Hard
Community Size Large Very Large
Documentation Quality 8 10
Ecosystem Maturity 6 10
Industry Adoption 7 10
Type System Complexity 7 8
Concurrency Support 7 9
Performance - Execution Speed 9 10
Performance - Memory Usage 9 9
Performance - Startup Time 9 10
Tooling Quality 7 8
Package Manager Quality 8 10
IDE Support 8 8
Debugging Experience 8 9
GitHub Stars Rank 40 13
Stack Overflow Tags Rank 49 6
Average Salary Rank 42 7
Job Postings Rank 56 11
Benchmarks Rank 32 24
Learning Curve Score 3 2
Community Size Score 7 9
AHP Score 6.83 8.28

AHP综合评分

  • Lua: 6.83 (#34)
  • C: 8.28 (#9)
Lua             | ####### 6.83
C               | ######## 8.28

何时选择Lua

Automation, Scripting, DevOps, Text Processing. Lua 是一种Procedural, Object-Oriented编程语言,首次出现于 1993 年,由 PUC-Rio 设计。主要应用场景:Automation, Scripting, DevOps。

何时选择C

Systems Programming, Embedded, Performance-Critical Applications. C 是一种Procedural, Object-Oriented, Generic编程语言,首次出现于 1972 年,由 Dennis Ritchie 设计。主要应用场景:Systems Programming, Embedded, Performance-Critical Applications。

Hello World 示例

Lua:

print('Hello, World!')

C:

#include <stdio.h>
int main(){ printf("Hello, World!\n"); return 0; }

Other languages