VLA(variable length array), 这术语以前也没仔细想过应该如何翻译。
C99的中文资料不多, 印象中那些资料 ...
OwnWaterloo 发表于 2010-12-22 14:11
From Wikipedia, the free encyclopedia
In programming, a variable-length array (or VLA) is an array data structure of automatic storage duration whose length is determined at run time (instead of at compile time).
hugegrass 发表于 2010-12-24 18:25
这个问题其实说过了,无论是变长数组还是变量长度数组都 可能会让读者误解为数组长度在生命周期内可变。
就拿变量长度数组来说int a[m]; 我定义后m++,那么a的长度是不是也++了?这自然不是,但是如果不说明,读者怎么会知道?
这和变长数组在解释这点上所花费的功夫与变量长度这个翻译是等同的,不存在孰优孰劣之分。
在这个歧义的避免方面,上述两个翻译方案都不甚恰当。
davelv 发表于 2010-12-25 15:17
准变长数组
variable解释成变量表达式……
非要说variable在这里就是形容词转名词所以是变量我就忍了,还要拿variable当变量表达式来说,这也太夸张了吧。
另外VM怎么解释。Variably Modified type。“变量地被修改的类型”么?
狗气球 发表于 2011-01-03 14:03
From Wikipedia, the free encyclopedia
In programming, a variable-length array (or VLA) is an array data structure of automatic storage duration whose length is determined at run time (instead of at compile time).
hugegrass 发表于 2010-12-24 18:25
可不可变是角度不同,站在调用者的角度,传入不同的值,其数组长度不同,可变。
在被调用者的角度,无论你传什么进来,我一旦确定长度后在这个栈中就不能更改,不可变。
davelv 发表于 2010-12-31 19:04
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |