c++ 随手记
強類型的理解
先定義一些基礎(chǔ)概念Program Errors
- trapped errors。導(dǎo)致程序終止執(zhí)行,如除0,Java中數(shù)組越界訪問
- untrapped errors。 出錯后繼續(xù)執(zhí)行,但可能出現(xiàn)任意行為。如C里的緩沖區(qū)溢出、Jump到錯誤地址
Forbidden Behaviours
語言設(shè)計時,可以定義一組forbidden behaviors. 它必須包括所有untrapped errors, 但可能包含trapped errors.
Well behaved、ill behaved
- well behaved: 如果程序執(zhí)行不可能出現(xiàn)forbidden behaviors, 則為well behaved。
- ill behaved: 否則為ill behaved..
?
轉(zhuǎn)載于:https://www.cnblogs.com/lyz007/p/6289335.html
總結(jié)
- 上一篇: 纯js实现瀑布流布局及ajax动态新增数
- 下一篇: 第2月第5天 arc invocatio