李洋学习笔记-ECMA262翻译(一)

阅读数:1510 发布时间:2016-06-01 19:36:32

作者:zzl005 标签: 李洋 ECMA 委培班 w1 翻译 javascript 英语单词

ECMA262翻译笔记(一)

ECMAScript is an object-oriented programming language for performing computations and manipulating computational objects within a host environment.ECMAScript as defined here is not intended to be computationally self-sufficient;indeed,there are no provisions in this specification for input of external data or output of computed results.Instead,it is expected that the computational environment of an ECMAScitp program will provide not only the objects and other facilities described in this specification but also certain environment-specific objects,whose description and behaviour are beyond the scope of this specification except to indicate that they may provide certain properties that can be accessed and certain functions that can be called from an ECMAScript program

ECMAScript是一个面向对象编程语言来执行计算和处理计算对象在宿主环境内。ECMAScript这里定义并不是为了计算自给自足,的确,有在本说明书中对外部数据的输入或运算结果的输出的规定。相反,它预计ECMAScript程序的计算环境将不仅提供的对象,并在本说明书中描述的其它设施,但也某些特定环境的对象,其描述和行为超出了本说明书除的范围,以表示它们可以提供可被访问某些属性和某些功能,可以从ECMAScript程序被调用

ECMAScript was originally designed to be used as a scripting language,but has become widely used as a general purpose programming language.A scripting language is a programming language that is used to manipulate,customize,and automate the facilities of an existing system.In such systems,useful functionality is already available through a user interface, and the scripting language is mechanism for exposing that functionality to program control.In this way,the existing system is said to provide a host environment of objects and facilities,which completes the capabilities of the scripting language.A script language is intended for use by both professional and non-professional programmers.

ECMAScript的最初被设计用来作为脚本语言,但已成为广泛地用作通用编程语言。脚本语言是用来操作,自定义和自动化现有系统设施的编程语言。在这种系统中,有用的功能是已经可以通过一个用户界面,并且脚本语言是用于暴露该功能进行编程控制的机制。以这种方式,现有系统被认为提供的对象和设施的主机环境,完成脚本语言的能力。脚本语言是供专业和非专业程序员使用

A web browser provides an ECMAScript host environment for client-side computation including,for instance, objects that represent windows, menus, pop-ups, dialog boxes, text areas, anchors, frames, history, cookies, and input/output.Further,the host environment provides a means to attach scripting code to events such as change of focus, page and image loading,uploading, error and abort, selection, form submission, and mouse actions.Scripting code appears within the HTML and the displayed page is combination of user interface elements and fixed and computed text and images. The scripting code is reactive to user interaction and there is no need for a main program.

网页浏览器为客户端的计算提供一个ECMAScript宿主环境,包括窗口,菜单,弹出窗口,对话框,文本区域,锚,框架,历史记录,cookies对象和输入/输出的ECMAScript的主机环境。此外,宿主环境提供了手段使脚本附加到事件,如焦点的改变,页面和图片的加载、未加载,错误和停止,选择、提交表单、鼠标操作。脚本代码出现HTML和所显示的页面是用户界面元素并固定和计算的文本和图像的组合。脚本代码是对用户的互交有反应的,不需要为一个主程序。

ECMAScript is object-based:basic language and host facilities are provided by objects,and an ECMAScript programe is cluster of communicating object.In ECMAScript,an object is a collection of zero or more properties each with attributes that determine how each property can be used- for example,when the Writable attribute for a property is set to false,any attempt by executed ECMAScript code to assign a different value to the property fails.Properties are containers that hold other objects,primitive values,or functions.A primitive value is a member of one of the following built-in types:Undefined,Null,Boolean,Number,String,and Symbol;an object is a member of the built-in type Object;and a function is a callable object.A function that is associated with an object via a property is called a method.

ECMAScript是基于对象:提供基本语言和主机设施通过对象,在ECMAScript中一个对象的是每个零个或多个属性的集合与该确定每个属性可以如何使用,例如属性,当为一个属性的可写属性被设置为假,由执行的ECMAScript代码的任何尝试分配不同的值给属性失败。属性是容器来包括其他对象,原始值和函数。一个原始值是一个成员在以下内在类型:Undefined,Null,Boolean,Number,String,and Symbol。对象是内置Object类型的成员;和一个函数是一个可调用对象。一个与物体通过一个属性相关联的函数称为方法。


词汇总结

单词 翻译
specification 规范
embedded 嵌入的
abstraction 抽象
subsequent 随后的
procedure 过程,步骤
primitive 原始
indicate 显示
exotic 外来的
intrinsic 内在的
prototype chain 原型链
manipulate 操纵,操作
supplemental 补充的,追加的
destructuring 解构
asynchronous 异步
sufficient 充分的

相关文章推荐: