楼主: ltx5151
1352 0

[程序分享] Which programming language is the most concise? [推广有奖]

  • 0关注
  • 26粉丝

VIP

已卖:19份资源

教授

26%

还不是VIP/贵宾

-

威望
1
论坛币
48929 个
通用积分
65.4534
学术水平
100 点
热心指数
143 点
信用等级
68 点
经验
2871 点
帖子
529
精华
0
在线时间
1312 小时
注册时间
2009-5-7
最后登录
2024-5-26

楼主
ltx5151 发表于 2012-11-22 11:49:39 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Which programming language is the most concise?


by David Smith


An expressive programming language allows developers to implement algorithms quickly, by using high-level concepts and leaving the details to the language implementation. The result is clearer, more maintainable code that can be created in less time. (Although shorter code isn't always better, especially when taken to extremes.)
So which programming languages use the least code, when compared on an apples-to-apples basis? At the WolframAlpha blog, Jon McLoon analysed the same algorithms (from the Rosetta Code project) implemented in 14 different languages, and compared the program sizes. Jon used the metrics of lines of code, characters of code, and token count (which ignores varying length of procedure names) to measure program size. According to Jon, the fairest comparison is character count for non-trivial algorithms ("large tasks"), and the results are shown below:
The shortest code on average is produced by programs written in Wolfram's Mathematica. The runner-up isClojure, closely followed by the R language. For comparison, programs written in Python are more than twice the length of equivalent programs in R; programs in C++ are about 4x the length. Read the complete analysis at the link below.
Wolfram Blog: Code Length Measured in 14 Languages



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Programming Language Concise Program Which especially concepts created details shorter

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-31 17:30