d******a 发帖数: 32122 | 1 There are 20 Programming Languages in the World where the array index starts
from 1 and not from 0. Some of the popular languages include R, COBOL,
Matlab and Julia.
Most programmers think that array indices start with 0 always but this is
not the case. The start index of 0 or 1 is decided based on various factors.
The 20 Programming Languages where indices start from 1 (NOT 0) are:
ALGOL 98
APL
AWK
CFML
COBOL
Fortran
FoxPro
Julia
Lingo
Lua
Mathematica
Matlab
PL/I
RPG
R
Ring
Sass
Smalltalk
Wolfram Language
XPath/ XQuery |
n******t 发帖数: 4406 | 2 有luajit在,lua應該很難被超過吧。
不過index-1的語言,不是設計人數學沒學好,就是針對數學沒學好的用戶。
starts
factors.
【在 d******a 的大作中提到】 : There are 20 Programming Languages in the World where the array index starts : from 1 and not from 0. Some of the popular languages include R, COBOL, : Matlab and Julia. : Most programmers think that array indices start with 0 always but this is : not the case. The start index of 0 or 1 is decided based on various factors. : The 20 Programming Languages where indices start from 1 (NOT 0) are: : ALGOL 98 : APL : AWK : CFML
|
b***i 发帖数: 3043 | 3 Pascal很快吧
starts
factors.
【在 d******a 的大作中提到】 : There are 20 Programming Languages in the World where the array index starts : from 1 and not from 0. Some of the popular languages include R, COBOL, : Matlab and Julia. : Most programmers think that array indices start with 0 always but this is : not the case. The start index of 0 or 1 is decided based on various factors. : The 20 Programming Languages where indices start from 1 (NOT 0) are: : ALGOL 98 : APL : AWK : CFML
|
d******a 发帖数: 32122 | 4 Fortan的设计人数学没学好?
【在 n******t 的大作中提到】 : 有luajit在,lua應該很難被超過吧。 : 不過index-1的語言,不是設計人數學沒學好,就是針對數學沒學好的用戶。 : : starts : factors.
|
d******a 发帖数: 32122 | 5 Pascal和Visual Basic 6一样,都是可以自定义起始index的
【在 b***i 的大作中提到】 : Pascal很快吧 : : starts : factors.
|
n******t 发帖数: 4406 | 6 其實如果是矩陣或者運算,0還是1區別不大。問題是一旦和內存地址做運算,0是最自
然的選擇。Fortran因爲自己基本上把語言限定在了科學計算的範疇,這個設計其實還
OK。再說Fortran是可以指定0還是1 index的。
”數學學好“是指在設計語言的時候選取最自洽的設計方式,不是說語言只能用來做數
學計算。
【在 d******a 的大作中提到】 : Fortan的设计人数学没学好?
|
B********u 发帖数: 1 | 7 matlab提供的包/函数都优化很好
几乎没法比it更快
starts
factors.
【在 d******a 的大作中提到】 : There are 20 Programming Languages in the World where the array index starts : from 1 and not from 0. Some of the popular languages include R, COBOL, : Matlab and Julia. : Most programmers think that array indices start with 0 always but this is : not the case. The start index of 0 or 1 is decided based on various factors. : The 20 Programming Languages where indices start from 1 (NOT 0) are: : ALGOL 98 : APL : AWK : CFML
|
d******a 发帖数: 32122 | 8 个例,不具代表性
https://programming-language-benchmarks.vercel.app/python-vs-julia
【在 B********u 的大作中提到】 : matlab提供的包/函数都优化很好 : 几乎没法比it更快 : : starts : factors.
|
d******a 发帖数: 32122 | 9 用python的一般不会玩地址吧
【在 n******t 的大作中提到】 : 其實如果是矩陣或者運算,0還是1區別不大。問題是一旦和內存地址做運算,0是最自 : 然的選擇。Fortran因爲自己基本上把語言限定在了科學計算的範疇,這個設計其實還 : OK。再說Fortran是可以指定0還是1 index的。 : ”數學學好“是指在設計語言的時候選取最自洽的設計方式,不是說語言只能用來做數 : 學計算。
|