Why doesn't ActionScript have “generics”?

前端 未结 4 1058
死守一世寂寞
死守一世寂寞 2020-12-18 18:14

Can anyone tell me why ActionScript 3, a statically typed language, doesn\'t have generics? Is it too much work? A historical thing? Is there some way to \"fake\" it that I

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-18 18:44

    Parameteric types ( the word 'generics' is usually used in ECMAScript for generic methods, rather than the combination of parametric types and runtime polymorphism used in Java ) were proposed as part of ES4, but ES4 fractured and much of the type system proposed for ES ( including the parts implemented in ActionScript ) are not going into the next version. I can't say whether or not Adobe would want to go that way by themselves.

提交回复
热议问题