知识大全 世界上误解最深的语言[2]
Posted 语言
篇首语:如果学习只在于模仿,那么我们就不会有科学,也不会有技术。本文由小常识网(cha138.com)小编为大家整理,主要介绍了知识大全 世界上误解最深的语言[2]相关的知识,希望对你有一定的参考价值。
JavaScript:世界上误解最深的语言[2] 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
The ECMA mittee that has stewardship over the language is developing extensions which while well intentioned will aggravate one of the language s biggest problems: There are already too many versions This creates confusion
ECMA委员会 这门语言的管家 正在对它进行扩展 也在蓄意恶化它最大的问题 有太多的版本 这是混乱的根源
Design Errors 设计上的错误 No programming language is perfect JavaScript has its share of design errors such as the overloading of + to mean both addition and concatenation with type coercion and the error prone with statement should be avoided The reserved word policies are much too strict Semicolon insertion was a huge mistake as was the notation for literal regular expressions These mistakes have led to programming errors and called the design of the language as a whole into question Fortunately many of these problems can be mitigated with a good lint program
没有什么编程语言是完美的 JavaScript也有它设计上的错误 比如重载的+号随着类型的不同既表示 相加 又表示 连接 和本该避免的有错误倾向的 with 语句 它的保留字策略过于严格 分号的插入是一个巨大的错误 比如作为字面正则表达式的符号时 这些失误已直接导致编程中的错误 也使这门语言的整体设计遭人质疑 还好 这些问题中有许多都可以在良好的 lint 程序中得以缓解
The design of the language on the whole is quite sound Surprisingly the ECMAScript mittee does not appear to be interested in correcting these problems Perhaps they are more interested in making new ones
这门语言的整体设计(上的问题)是相当明显的 奇怪的是ECMAScript委员会并没有对修正其中存在的问题表现出太大的兴趣 也许他们更热衷于制造新的问题
Lousy Implementations 糟糕的实现
Some of the earlier implementations of JavaScript were quite buggy This reflected badly on the language Compounding that those implementations were embedded in horribly buggy web browsers
JavaScript的一些早期实现有许多bug 这反过来对语言本身产生了很坏的影响 更糟糕的是这些满是bug的实现是嵌入在满是bug的web浏览器中的
Bad Books 糟糕的书
Nearly all of the books about JavaScript are quite awful They contain errors poor examples and promote bad practices Important features of the language are often explained poorly or left out entirely I have reviewed dozens of JavaScript books and I can only remend one: JavaScript: The Definitive Guide ( th Edition) by David Flanagan (Attention authors: If you have written a good one please send me a review copy )
几乎所有的JavaScript书都是相当可怕的 它们包含错误 包含不好的例子 并鼓励不好的做法 JavaScript语言的一些重要特性它们要么没有解释清楚 要么根本就没有提及 我看过很多JavaScript的书 但我只能推荐一本 David Flanagan著的 JavaScript: The Definitive Guide ( th Edition) (《JavaScript权威指南 第四版》) (作者们请注意 如果你们写出了好书请发给我一份副本 我给你们校对 )
Substandard Standard 准标准 的标准
The official specification for the language is published by ECMA The specification is of extremely poor quality It is difficult to read and very difficult to understand This has been a contributor to the Bad Book problem because authors have been unable to use the standard document to improve their own understanding of the language ECMA and the TC mittee should be deeply embarrassed
ECMA公布的官方语言规范的质量极其的差 不仅难读而且极其难懂 它可为那些 糟糕的书 做出了不小的贡献 因为那些作者无法通过这个标准文档来更深地理解这门语言 ECMA和TC 应该为此感到非常尴尬
Amateurs业余者
Most of the people writing in JavaScript are not programmers They lack the training and discipline to write good programs JavaScript has so much expressive power that they are able to do useful things in it anyway This has given JavaScript a reputation of being strictly for the amateurs that it is not suitable for professional programming This is simply not the case
使用JavaScript的人大多不是程序员 他们缺少写良好程序的培训和训练 JavaScript有非常强大的表现力 不管怎样他们也能使用它做有用的事情 这给了JavaScript一个 全然适合业余爱好者而不适合专业程序员 的名声 这很明显是一个错误
Object Oriented面向对象
Is JavaScript object oriented? It has objects which can contain data and methods that act upon that data Objects can contain other objects It does not have classes but it does have constructors which do what classes do including acting as containers for class variables and methods It does not have class oriented inheritance but it does have prototype oriented inheritance
JavaScript是面向对象的吗?它有对象 它的对象可以包含数据以及对数据进行操作的方法 对象也可以包含其他的对象 它没有类 但是它有构造函数来做类的事情 包括声明类的变量和方法 它没有面向类的继承 但是他有面向原型的继承
The o main ways of building up object systems are by inheritance (is a) and by aggregation (has a) JavaScript does both but its dynamic nature allows it to excel at aggregation
构建对象系统的两大主要方法是继承(is a)和聚合(has a) 这两者JavaScript都有 但是它的动态天性允许有比聚合更好的实现方式
Some argue that JavaScript is not truly object oriented because it does not provide information hiding That is objects cannot have private variables and private methods: All members are public
一些关于JavaScript不是真的面向对象的争论其理由是它没有提供信息隐藏 也就是说JavaScript的对象没有私有变量和私有方法 它的所有成员都是公开的
But it turns out that JavaScript objects canhave private variables and private methods (Click here now to find out how ) Of course few understand this because JavaScript is the world s most misunderstood programming language
但是事实是JavaScript 的对象可以有私有变量和私有方法(点击这里来看如何实现) 当然 之所以很少有人知道这个是因为JavaScript是世界上误解最深的语言嘛
Some argue that JavaScript is not truly object oriented because it does not provide inheritance But it turns out that JavaScript supports not only classical inheritance but other code reuse patterns as well
另一些关于JavaScript不是真的面向对象的争论其理由是它没有提供继承 但是事实是JavaScript不但支持经典的继承 而且支持其他一些代码重用的模式
Copyright Douglas Crockford All Rights Reserved Wrrrldwide
cha138/Article/program/Java/JSP/201311/20722相关参考
世界上最深的海沟位于:_____A、太平洋B、大西洋C、北冰洋D、印度洋答案:A解析:世界上最深的海沟在太平洋西侧,叫马里亚纳海沟。它的最深点查林杰深渊最大深度为11034米。
英语翻译英语是世界上通用的语言英语是世界上通用的语言Englishisthemostmonlyusedlanguageintheworld.英语是世界上通用的语言(翻译成英语是什么?)Englishi
世界上最难学的语言是哪种语言?怎样把日语学好?好多人都说日语越学到后面越难,有什么好方法吗?最难学的当然是汉语!日语嘛,那些说越学到后面越难的人只是应为他们刚开始学的时候不认真,问题拖啊拖啊,就搞不定
世界上语言使用最多的前二十位是?《民族语》第15版的统计数据排名语言民族语代码语系使用者(括号包括非母语)1汉语,官话(现代标准汉语)cmn汉藏语系,汉语族872,700,000(1,066,600,
世界上最精确的语言是哪一种我认为汉语最好。因为在所有的联合国文件中,中文的最保中文词汇极为丰富,但是基本词汇极少。语法简单,几乎可以说中文没有语法。发音有调子。一共才1600个左右的发音。但是中文书写
知识大全 その时のことを友人に话してもらって,やっと先生の误解が( ).
その时のことを友人に话してもらって,やっと先生の误解が().1)やんだ:止む,中止2)とけた:解ける,化解3)きえた:消える,消失4)ぬけた:抜ける,脱落根据意思,选择2)とけた翻译:たとえ世界の全て
知识大全 写出一条你在活动过程中收集到的印象最深的广告词,并简要写出印象深刻的原因。
写出一条你在活动过程中收集到的印象最深的广告词,并简要写出印象深刻的原因。人生,就像一场旅行,不必在乎目的地,在乎的,是沿途的风景,以及看风景的心情。原因:这句话很朴素,却蕴藏着人生的道理。世界缺水、
“世界通用的语言——英语”翻译成中文是什么意思?翻译成英语吧??Englishisinmonusedallaroundtheworld.IfyoucanspeakEnglishthatyoucantr
机会面前人人平等,可是每个人把握机会的能力并不“同等”。在应征现场,有的求职者由于对招聘广告或者面试官的语言产生了“误解”或“想当然”,以至于对面前的机会视而不见。这里特别截取了求职现场的几段对话,看
用简洁语言的概括人生观,价值观,世界观,谢谢了!凡事都不计较,毕竟什么都不能带走;不管怎样都要让自己快乐;尽最大努力帮助身边的人用简洁的语言概括人生观,价值观,世界观,麻烦了,我想把这3个观了解.一定