为什么没有动作有无"仿制药"? [英] Why doesn't ActionScript have "generics"?
问题描述
谁能告诉我,为什么ActionScript 3的,静态类型语言,不具备仿制药?是不是太辛苦了?的历史的东西吗?是否有某种方式为假这是我还没有发现罢了?
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 haven't picked up yet?
修改的:非常感谢你的答案!该向量
类基本上是我一直在寻找,其他资料也有帮助。
Edit: thanks a lot for the answers! The Vector
class is basically what I was looking for, and the other information was helpful too.
推荐答案
新矢量类是仿制药的一种形式,它的ActionScript 3现在支持编译时为Flash Player 10,他们不支持自己的泛型类的规范,但。
The new Vector class is a form of generics that Actionscript 3 now supports when compiled for Flash Player 10. They don't support the specification of your own generic classes, yet.
我认为Adobe将最终实施ES4标准。这将是很好,如果他们有谁能够更快地推动他们在正确的方向上的竞争对手。我期待从更新多一点AS3时他们搬到了CS4,但我想革命的向量类必须足够了。
I think Adobe will implement the ES4 standard eventually. It would be nice if they had a competitor who could push them quicker in the right direction. I was expecting a little more from the updates to AS3 when they moved to CS4, but I suppose the revolutionary Vector class will have to suffice.
看起来他们花了很多时间催谷的库Flex和AIR,也许他们会回去以后提高语言的支持,但它可能不是一个真正的优先事项。请记住,Adobe是在它的钱,而不是让最甜美的可能语言的感觉很好。
It looks like they spent a lot of time beefing up the libraries for Flex and AIR, so maybe they'll go back to improving the language support later, but it probably isn't a real priority. Remember, Adobe is in it for the money, not for the feel good of making the sweetest possible language.
这篇关于为什么没有动作有无"仿制药"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!