客观地了解Javascript 2.0:回顾

There has been no shortage of debate over Javascript 2.0, based on ECMAScript 4.0. Some people are extremely excited about some of the new features being discussed, and some feel that Javascript 2.0 is shaping up to look a bit too much like Java or even C++ for their tastes.

已经有没有 短缺 辩论过JavaScript 2.0,基于ECMAScript 4.0。 有些人对正在讨论的一些新功能感到非常兴奋,有些人则认为Javascript 2.0的外观似乎太像Java甚至C ++。

Whether you like the new features being proposed, think they’re silly and unnecessary, or have no idea what the heck I am talking about, I think it’s important to have a firm grasp on some of the changes being proposed. Doing so will help you to better understand both sides of the debate, and also help to prepare you for when Javascript 2.0 becomes available for use.

无论您是喜欢提出的新功能,认为它们是愚蠢且不必要的,还是不知道我在说什么,我都必须牢记要提出的一些变更,这一点很重要。 这样做将有助于您更好地理解辩论的双方,也有助于您准备使用Javascript 2.0。

There’s far too many changes and fixes to discuss them in one post, so this will be an ongoing serious of posts. I’ll be taking a look at what the new language provides us and why. Hopefully by taking a closer look at all the changes, we can get a better feel for how those changes affect both web developers and javascript in general. First though, we should take a quick look at how Javascript got to this point, and the reasoning behind the changes beings suggested in Javascript 2.0.

太多的更改和修复程序无法在一个帖子中讨论,因此这将是持续不断的重要帖子。 我将研究新语言为我们提供的内容以及原因。 希望通过仔细研究所有更改,我们可以更好地了解这些更改如何影响Web开发人员和一般的javascript。 不过,首先,我们应该快速浏览一下Javascript如何达到这一点,以及Javascript 2.0中提出的更改背后的原因。

很久以前… (Once Upon a Time…)

Javascript has been around since 1995, when it was debuted in Netscape Navigator 2.0. The original intent was for Javascript to provide a more accessible way for web designers and non-Java programmers to utilize Java applets. In reality though, Javascript was used far more often to provide levels of interactivity on a page…allowing for the manipulation of images and document contents.

Javascript自1995年问世以来,当时在Netscape Navigator 2.0中首次出现。 最初的目的是让Javascript为Web设计人员和非Java程序员提供一种更易于使用的方式来利用Java小程序。 但是实际上,使用Javascript的频率更高,可以在页面上提供一定程度的交互性,从而可以处理图像和文档内容。

Microsoft then implemented Javascript in IE 3.0, but their implementation varied from that of Netscape�s and it became apparent that some sort of standardization was necessary. So the European Computer Manufacturers Association (ECMA) standards organization developed the TC39 committee to do just that.

微软随后在IE 3.0中实现了Javascript,但是它们的实现与Netscape的实现不同,并且显然需要某种标准化。 因此,欧洲计算机制造商协会(ECMA)标准组织为此成立了TC39委员会。

In 1997, the first ECMA standard, ECMA-262, was adopted. The second version came along a bit later and consisted primarily of fixes. In December of 1999, when the third version rolled out, the changes were more drastic. New features like regular expressions, closures, arrays and object literals, exceptions and do-while statements were introduced, greatly adding value to the language. This revision, ECMAScript Edition 3, is fully implemented by Javascript 1.5, which is the most recently released version of Javascript.

1997年,采用了第一个ECMA标准ECMA-262。 第二个版本后来出现了,主要包括修复程序。 在1999年12月,当第三个版本推出时,更改变得更加激烈。 引入了新功能,如正则表达式,闭包,数组和对象文字,异常和do-while语句,极大地增加了该语言的价值。 此版本ECMAScript Edition 3由Javascript 1.5(这是Javascript的最新发布版本)完全实现。

Like ECMAScript 3, the proposed ECMAScript 4 specification will provide a very noticeable change in the language. As it stands now, Javascript 2.0 will be featuring, among other changes, support for things like scoping, typing and class support.

与ECMAScript 3一样,建议的ECMAScript 4规范将在语言方面提供非常明显的变化。 就目前情况而言,除了其他更改外,Javascript 2.0将具有对范围,键入和类支持等功能的支持。

让辩论开始 (Let the Debate Begin)

While some of the changes are bug fixes, the justification for the major revisions appears to be largely based on providing better support for developing larger-scale applications. With the growing popularity of AJAX, and the rise of RIAs, Javascript is now being used for much larger-scale apps than it was ever intended for. The proposed changes to ECMAScript 4 are intended to help make development of those kinds of apps easier by making the language more disciplined and therefore making it easier for multiple developers to work on the same application.

尽管其中一些更改是错误修复,但主要修订的理由似乎主要是基于为开发大型应用程序提供更好的支持。 随着AJAX的日益普及以及RIA的兴起,Javascript现在正用于比预期的规模更大的应用程序。 对ECMAScript 4的拟议更改旨在通过使语言更加严格,从而使多个开发人员更轻松地在同一个应用程序上工作,来帮助简化此类应用程序的开发。

This is where the debate starts….how much do we need these revisions? Technically, we can implement a lot of the same kinds of structures using the language as it stands currently. The proposed changes are aimed at making that easier, but there are some people who worry about the effect this may have on what is currently a very expressive and lightweight language.

这是辩论开始的地方……我们需要多少这些修订? 从技术上讲,我们可以使用目前使用的语言来实现许多相同类型的结构。 拟议的更改旨在使此操作更容易,但是有些人担心这可能会对当前非常富有表现力的轻量级语言产生影响。

Which group is correct? Are the changes going to make our lives as Javascript developers easier, or force us to lose a lot of what makes Javascript such an attractive scripting language to use today? I think the only way to really judge how the changes will affect us is to take a closer look at the changes themselves and see both the good and the bad. *[AJAX]: Asynchronous Javascript and XML *[RIAs]: Rich Internet Applications

哪一组是正确的? 这些变化是否将使我们作为JavaScript开发人员的生活更轻松,还是迫使我们失去很多使Java成为当今如此有吸引力的脚本语言的原因? 我认为,真正判断这些变化将如何影响我们的唯一方法是仔细观察这些变化本身,并了解其利弊。 * [AJAX]:异步Javascript和XML * [RIA]:富Internet应用程序

翻译自: https://timkadlec.com/2008/04/an-objective-look-at-javascript-2-0-looking-back/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值