聊一聊泛型的可空性(kotlin)
什么?泛型本身也可以是nullable?上来就抛这么个问题实在是不够友好~
首先回顾,什么是泛型?Oracle Java Tutorials
Introduced in J2SE 5.0, this long-awaited enhancement to the type system allows a type or method to operate on objects of various types while providing compile-time type safety. It adds compile-time type safety to the Collections Framework and eliminates the drudgery of casting.
泛型的本质是参数化类型,也就是说操作的数据类