As a general rule, code which is explicitly version (or platform)dependent
should be hidden behind a low-level macro or function. High-level code can then
just call those functions without concern for the low-level details. Code written in
should be hidden behind a low-level macro or function. High-level code can then
just call those functions without concern for the low-level details. Code written in
this way tends to be easier to read and more robust.
<ldd>
本文探讨了如何将显式依赖于特定版本或平台的代码通过宏或函数进行封装的方法,以此来提高代码的可读性和健壮性。通过这种方式,高级代码可以调用这些封装好的函数,而无需关心底层细节。
853

被折叠的 条评论
为什么被折叠?



