runtime check:运行时检查;指程序在运行期间对条件进行验证(如数组越界、空指针、类型/断言、溢出等),以便及时报错或采取保护措施。常与“编译时检查(compile-time check)”相对。
/ˈrʌn.taɪm tʃek/
The language performs a runtime check for array bounds.
该语言会对数组边界进行运行时检查。
To improve reliability, we added a runtime check that throws an error when the input is missing or malformed.
为了提高可靠性,我们添加了运行时检查:当输入缺失或格式错误时就抛出错误。
runtime 由 run(运行)+ time(时间)组成,表示“程序运行的时期/阶段”;check 源自古法语 eschequier(原指“在棋盘/算筹盘上核对账目”),后引申为“核对、检查”。组合起来即“在运行阶段进行的检查”。