什么是JavaScript和ActionScript 3的之间的主要区别是什么? [英] What are the key differences between JavaScript and ActionScript 3?

查看:468
本文介绍了什么是JavaScript和ActionScript 3的之间的主要区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这两种语言都来自同一个ECMA-262标准。看来,这两个正在成为使用JavaScript通过方法添加事件侦听器的核心对象实例,如冻结非常相似封印在EMCAScript-262第5版和这样的。我想知道的区别是什么?

I know both languages are from the same ECMA-262 standard. It seems that the two are becoming very similar with JavaScript adding event listeners for core Object instances through methods like freeze and seal in EMCAScript-262 5th edition and such. I was wondering what the differences are?

推荐答案

首先,所有ActionScript 3和JavaScript中的 ECMA-262 所以他们有很多共同点。这两种语言功能原型继承的实例。然而不正确的动作完全实现<一个href="http://docs.google.com/viewer?url=http://www.ecmascript.org/es4/spec/overview.pdf">ES4.

First of all ActionScript 3 and JavaScript are both defined in ECMA-262 so they have a lot in common. Both languages feature prototype inheritance for instance. It is however not correct that ActionScript fully implements ES4.

动作实现了几个未在ECMA-262定义和功能方面的一些 - 但绝对不是全部 - ES4的

ActionScript implements a couple of features that are not defined in ECMA-262 and some -- but definitely not all -- of ES4.

那么,是什么AS3添加到ECMA-262?这些也是差异的JavaScript:

So what does AS3 add to ECMA-262? Those are also the differences to JavaScript:

  • 在动态和静态类型code
  • 在包,类和接口
  • 在标准的面向对象的继承模式(而不是基于原型的,静态类型)
  • UINT与int数据类型
  • 在E4X(ECMA-357)
  • 类型安全的条件编译(ES4)
  • 矢量&lt; T&GT;数据类型(ES4)

也许我已经忘记了某些功能。我不知道如果XML,返回XMLList等已经定义在262或带着357。

Maybe I have forgotten some features. I am not sure if XML, XMLList etc. are already defined in 262 or came with 357.

关键的区别不过是标准库。 JavaScript的带有一对夫妇predefined类,如DOMElement和浏览器相关的补充的。动作有一个与像视频流媒体功能相当庞大的标准库,并在所有平台上是一致的。

The key difference however is the standard library. JavaScript comes with a couple of predefined classes like DOMElement and browser dependent additions. ActionScript has a fairly large standard library with features like video streaming and is consistent over all platforms.

这篇关于什么是JavaScript和ActionScript 3的之间的主要区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆