While this solution works , it requires a dynamic type check at run - time , which adds overhead 当以上解决方案运行时,加在上面的代码要求进行一个运行时的动态类型检查。
" presents a variety of techniques for performing dynamic type checking , reducing the run - time overhead of such tests ”显示了执行动态类型检查、减少这种测试的运行时开销的各种技术。