属蛇的五行属什么| 嗓子疼喝什么饮料| 开庭前家属做什么准备| hpv检查前需要注意什么| 底妆是什么意思| eb病毒iga抗体阳性是什么意思| 一周年祭日有什么讲究| 剖腹产什么时候可以洗澡| 敕是什么意思| 说女人强势是什么意思| 什么时候是安全期| 谷草谷丙比值偏高说明什么| 玫瑰痤疮是什么原因| 六亲不认是什么生肖| 脖子疼是什么原因引起的| 惠什么意思| 柏字五行属什么| 屋里有蝙蝠有什么预兆| 尿肌酐是什么| crispi是什么牌子| 周吴郑王是什么意思| 天经地义是什么意思| 高中生吃什么提高记忆力| 7月7号是什么节日| biw医学上是什么意思| 铭是什么意思| 昵称是什么| 打太极是什么意思| 七活八不活是什么意思| 肺气肿是什么病严重吗| 蝉的鸣叫声像什么| 知见是什么意思| 用什么可以全身美白| 乳房变大是什么原因| 静的部首是什么| 吾儿是什么意思| 血小板偏高是什么意思| 阴道发白是什么原因| 露骨是什么意思| 氯读什么拼音| 经前期综合症吃什么药| 61岁属什么| 减肥不能吃什么| 后背沉重感是什么原因引起的| 印度属于什么人种| 最短的季节是什么| 免疫组化检查是什么意思| 镇党委副书记是什么级别| 脑萎缩是什么病| 玉兰油适合什么年龄| 右胸上方隐痛什么原因| 为什么一喝水就出汗| 头疼呕吐是什么原因| 新生儿吃什么钙好| 尿道炎什么症状| 梦见着大火了是什么征兆| 腺样体肥大吃什么药| 什么是素数| 什么叫法西斯| 灵芝的功效与作用是什么| 2021属什么| 狐臭应该挂什么科| 崩塌的读音是什么| 吃什么能丰胸| 东南五行属什么| 做梦坐飞机是什么意思| 武汉有什么好玩的地方| 孕妇吸二手烟对胎儿有什么影响| 1年是什么朝代| 蓄谋已久什么意思| claire是什么意思| 宋五行属什么| 梭织面料是什么面料| 潜血弱阳性什么意思| 做什么事要从头来| 自然流产是什么症状| u是什么元素| 11月20是什么星座| 寒碜是什么意思| 怀孕能吃什么水果| 孩子积食吃什么药| 海苔是什么| 益生菌什么时间吃最好| mra是什么意思| 腰酸痛是什么原因| 宝宝干呕是什么原因| 体检去医院挂什么科| 胸闷气短呼吸困难心慌是什么原因| 夜来香是什么花| 麻批是什么意思| 花团锦簇是什么意思| 些几 是什么意思| 时乖命蹇是什么意思| 汕头有什么好玩的地方| 羊水偏多对胎儿有什么影响| 祸祸是什么意思| 什么叫同工同酬| 大便粘马桶吃什么药| 犯了痔疮为什么老放屁| 胃疼吃什么食物| 华国锋为什么辞职| 宫颈粘液栓是什么样的| 妈妈生日送什么礼物好| 乳腺4a是什么意思| 青菜是什么菜| 进产房吃什么补充体力| 首肯是什么意思| 什么品牌的空气炸锅好| 艾滋病脖子有什么症状| 足底筋膜炎挂什么科| 座山雕什么意思| hcg偏高是什么原因| 细小是什么| 这什么| 10岁属什么| e m s是什么快递| 高血压要注意什么| 牙髓是什么| 79年属什么| 刘姥姥进大观园什么意思| 念珠菌感染用什么药效果好| 送老师什么花好| 脑彩超能检查出什么| 双儿是什么意思| 水瓶是什么星座| 北极为什么没有企鹅| 手指甲软薄是缺什么| 发痧吃什么药可以断根| 脂肪肝吃什么药好| 美人坯子是什么意思| 手工diy是什么意思| 稼穑是什么意思| 死而什么什么| 身体皮肤痒是什么原因| a型血为什么叫贵族血| 财年是什么意思| 屈原是什么诗人| 福州五行属什么| 手突然抽搐是什么原因| 毛毛虫吃什么| 三七粉什么时间喝好| 火龙果是什么季节的水果| 男人遗精是什么原因造成的| 五指毛桃长什么样子| 6月20日是什么星座| 不堪入目是什么意思| 火华读什么| 血糖高适合喝什么茶| 意蕴什么意思| 白细胞满视野是什么意思| 四月初七是什么星座| 有过之而不及什么意思| 梦到绿色的蛇是什么意思| 客源是什么意思| 沟壑是什么意思| 什么是工科| 黄瓜和青瓜有什么区别| 女性吃辅酶q10有什么好处| 中国精神是什么| 腰两边疼是什么原因| 高铁动车有什么区别| 蜜蜡什么样的成色最好| 大面积杀跳蚤用什么药| 吃什么好排大便| 尿频是什么原因| 桃花眼的女人什么命| 高级别上皮内瘤变是什么意思| 护肝吃什么好| chuck是什么意思| 屎壳郎长什么样| 口蜜腹剑是什么意思| 指数是什么| 肝不好的人有什么症状| 阑尾炎打什么消炎针好| 狮子座和什么座最配对| 八月七号是什么星座| 川贝是什么| 25分贝相当于什么声音| 耀字五行属什么| 欲拒还迎什么意思| 什么鞋油好用| 吃茄子有什么好处和坏处| 别出心裁是什么生肖| ml代表什么单位| 痔疮有什么影响| 大便羊屎粒是什么原因| 伤口发炎用什么药| 结肠炎不能吃什么食物| 42天产后检查都检查什么项目| 忆苦思甜下一句是什么| 拔罐颜色紫黑代表什么| 到底是什么| 春梦了无痕是什么意思| zbc什么意思| 放屁太臭是什么原因| 种植什么最赚钱农村| 血脂高胆固醇高吃什么好| 什么映雪| mf是什么意思| 观音菩萨是保佑什么的| 充饥是什么意思| 木加号读什么| 可乐喝多了有什么危害| 烂苹果气味的是什么病| 破财消灾什么意思| 褶是什么意思| 女汉子什么意思| 四风指什么| 三刀六洞什么意思| 2月15日是什么星座| 痔疮看什么科| 什么网站| 巡抚相当于现在的什么官| 求嗣是什么意思| 手心有痣代表什么| 痔疮是什么样的图片| 什么是飘窗| 什么什么情深| 螃蟹的血是什么颜色的| 资金流入股价下跌为什么| 间质性肺炎是什么意思| 已所不欲勿施于人是什么意思| 什么是衰老| 回南天是什么意思| 印度信仰什么教| 前胸后背疼挂什么科| 脑溢血是什么原因| 下水道井盖为什么是圆的| 尿道口红肿用什么药| 女人养颜抗衰老吃什么最好| 参拜是什么意思| 自汗是什么意思| Joyce什么意思| 丧偶什么意思| 字母圈是什么意思| 冰镇情人果是什么水果| 心绪不宁的意思是什么| 铁锈用什么能洗掉| 什么让生活更美好作文| 颈椎挂什么科| 白带是什么颜色的| 脸容易红是什么原因| joan什么意思| 什么鸡没有毛| 耳朵尖的人什么命| 手抓饼里面夹什么好吃| 手脚脱皮是什么原因导致的| 梦见被蛇追着咬是什么意思| 1月4号是什么星座| 缘是什么生肖| 副省长是什么级别| 头发掉的严重是什么原因| 1990年的马是什么命| 一什么影子| 电器发生火灾用什么灭火器| 血管钙化是什么意思| 奶茶有什么危害| 天那水是什么| 大什么大| 肺动脉高压用什么药| 看见蜈蚣有什么预兆| 西洋参是补什么的| 一直打嗝是什么原因引起的| 护身符是什么意思| 百度

Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.

Comparing Python to Other Languages

Comparing Python to Other Languages

Disclaimer: This essay was written sometime in 1997. It shows its age. It is retained here merely as a historical artifact. --Guido van Rossum
百度 据了解,派出所民警处警时张先生已被送入医院抢救。

Python is often compared to other interpreted languages such as Java, JavaScript, Perl, Tcl, or Smalltalk. Comparisons to C++, Common Lisp and Scheme can also be enlightening. In this section I will briefly compare Python to each of these languages. These comparisons concentrate on language issues only. In practice, the choice of a programming language is often dictated by other real-world constraints such as cost, availability, training, and prior investment, or even emotional attachment. Since these aspects are highly variable, it seems a waste of time to consider them much for this comparison.

Java

Python programs are generally expected to run slower than Java programs, but they also take much less time to develop. Python programs are typically 3-5 times shorter than equivalent Java programs. This difference can be attributed to Python's built-in high-level data types and its dynamic typing. For example, a Python programmer wastes no time declaring the types of arguments or variables, and Python's powerful polymorphic list and dictionary types, for which rich syntactic support is built straight into the language, find a use in almost every Python program. Because of the run-time typing, Python's run time must work harder than Java's. For example, when evaluating the expression a+b, it must first inspect the objects a and b to find out their type, which is not known at compile time. It then invokes the appropriate addition operation, which may be an overloaded user-defined method. Java, on the other hand, can perform an efficient integer or floating point addition, but requires variable declarations for a and b, and does not allow overloading of the + operator for instances of user-defined classes.

For these reasons, Python is much better suited as a "glue" language, while Java is better characterized as a low-level implementation language. In fact, the two together make an excellent combination. Components can be developed in Java and combined to form applications in Python; Python can also be used to prototype components until their design can be "hardened" in a Java implementation. To support this type of development, a Python implementation written in Java is under development, which allows calling Python code from Java and vice versa. In this implementation, Python source code is translated to Java bytecode (with help from a run-time library to support Python's dynamic semantics).

Javascript

Python's "object-based" subset is roughly equivalent to JavaScript. Like JavaScript (and unlike Java), Python supports a programming style that uses simple functions and variables without engaging in class definitions. However, for JavaScript, that's all there is. Python, on the other hand, supports writing much larger programs and better code reuse through a true object-oriented programming style, where classes and inheritance play an important role.

Perl

Python and Perl come from a similar background (Unix scripting, which both have long outgrown), and sport many similar features, but have a different philosophy. Perl emphasizes support for common application-oriented tasks, e.g. by having built-in regular expressions, file scanning and report generating features. Python emphasizes support for common programming methodologies such as data structure design and object-oriented programming, and encourages programmers to write readable (and thus maintainable) code by providing an elegant but not overly cryptic notation. As a consequence, Python comes close to Perl but rarely beats it in its original application domain; however Python has an applicability well beyond Perl's niche.

Tcl

Like Python, Tcl is usable as an application extension language, as well as a stand-alone programming language. However, Tcl, which traditionally stores all data as strings, is weak on data structures, and executes typical code much slower than Python. Tcl also lacks features needed for writing large programs, such as modular namespaces. Thus, while a "typical" large application using Tcl usually contains Tcl extensions written in C or C++ that are specific to that application, an equivalent Python application can often be written in "pure Python". Of course, pure Python development is much quicker than having to write and debug a C or C++ component. It has been said that Tcl's one redeeming quality is the Tk toolkit. Python has adopted an interface to Tk as its standard GUI component library.

Tcl 8.0 addresses the speed issuse by providing a bytecode compiler with limited data type support, and adds namespaces. However, it is still a much more cumbersome programming language.

Smalltalk

Perhaps the biggest difference between Python and Smalltalk is Python's more "mainstream" syntax, which gives it a leg up on programmer training. Like Smalltalk, Python has dynamic typing and binding, and everything in Python is an object. However, Python distinguishes built-in object types from user-defined classes, and currently doesn't allow inheritance from built-in types. Smalltalk's standard library of collection data types is more refined, while Python's library has more facilities for dealing with Internet and WWW realities such as email, HTML and FTP.

Python has a different philosophy regarding the development environment and distribution of code. Where Smalltalk traditionally has a monolithic "system image" which comprises both the environment and the user's program, Python stores both standard modules and user modules in individual files which can easily be rearranged or distributed outside the system. One consequence is that there is more than one option for attaching a Graphical User Interface (GUI) to a Python program, since the GUI is not built into the system.

C++

Almost everything said for Java also applies for C++, just more so: where Python code is typically 3-5 times shorter than equivalent Java code, it is often 5-10 times shorter than equivalent C++ code! Anecdotal evidence suggests that one Python programmer can finish in two months what two C++ programmers can't complete in a year. Python shines as a glue language, used to combine components written in C++.

Common Lisp and Scheme

These languages are close to Python in their dynamic semantics, but so different in their approach to syntax that a comparison becomes almost a religious argument: is Lisp's lack of syntax an advantage or a disadvantage? It should be noted that Python has introspective capabilities similar to those of Lisp, and Python programs can construct and execute program fragments on the fly. Usually, real-world properties are decisive: Common Lisp is big (in every sense), and the Scheme world is fragmented between many incompatible versions, where Python has a single, free, compact implementation.

治类风湿用什么方法好 品质是什么 皮肤挂什么科 焦虑症吃什么中成药 女人自尊心强说明什么
晚上睡不着什么原因 乌龟为什么不吃东西 蓝莓泡酒有什么功效 坚果是什么 你喜欢吃什么用英语怎么说
月经期间适合吃什么食物 阴道镜是什么 尿频尿急尿不尽吃什么药效果最好 陈皮泡水喝有什么功效 舌头不舒服是什么原因引起的
过敏吃什么药最有效 强光斑是什么意思 桃园三结义是什么意思 卷柏属于什么植物 什么是黑咖啡
晚上10点是什么时辰shenchushe.com 李元霸为什么怕罗士信hcv9jop0ns0r.cn 农历八月十五是什么节日hcv8jop0ns7r.cn 肠胃不舒服吃什么药hcv8jop9ns3r.cn hpl是什么意思bjhyzcsm.com
喜欢趴着睡觉是什么原因hcv8jop1ns8r.cn 女人腰上有痣代表什么hebeidezhi.com 肺热会引起什么症状hcv9jop8ns0r.cn 眼皮红肿是什么原因引起的hcv8jop6ns9r.cn 乳铁蛋白对宝宝有什么好处520myf.com
正财代表什么hcv8jop8ns5r.cn 女生安全期什么意思hcv9jop0ns6r.cn 发烧吃什么食物最好hcv9jop7ns5r.cn 卡布奇诺是什么意思zhongyiyatai.com 一月30号是什么星座hcv9jop0ns1r.cn
胃火旺吃什么hcv7jop9ns9r.cn 三个吉念什么hcv8jop0ns4r.cn 脑血管堵塞吃什么药好hcv7jop6ns3r.cn 掌中宝是什么部位hcv7jop4ns5r.cn 长方脸适合什么样的发型0735v.com
百度