python与perl的简单比较

python与perl的简单比较

ID:21845410

大小:576.50 KB

页数:13页

时间:2018-10-25

python与perl的简单比较_第1页
python与perl的简单比较_第2页
python与perl的简单比较_第3页
python与perl的简单比较_第4页
python与perl的简单比较_第5页
资源描述:

《python与perl的简单比较》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、廖海仁2011.9.15Python与Perl的简单比较语言简介PerlPython由C/sed/awk/shell演化而来适合文本处理、系统管理,不适合操作系统开发、多线程编程从ABC语言继承而来,主要受Modula-3影响,结合Unixshell与C的习惯面向对象、解释性、胶水语言优点PerlPython强大的正则表达式匹配功能复杂灵活的数据结构Unicode支持(相对AWK/C)自然语言(也是缺点)智能语言(也是缺点)简单、易学高层语言可移植性面向对象规范的代码(可读性强)图形功能(GUI)数值计算功能(NumPy)缺点PerlPython自然语言,代码晦涩难懂智能语言,可能产生臆断

2、,编程陷阱多不是很优美,很多方法做事,有时让编程者无所适从动态类型语言,不是很可靠,性能问题不适合多线程、底层编程、GUI编程易学难精强行缩进运行速度不够快(比较编译型语言)动态语言、解释型语言,调试困难(Perl不完全是解释型的)创始人LarryWall(Perl)LarryWallGuidovanRossum(Python)Languist(语言学家)PerlManywaystoaccompanythesametaskConstructsinteractincontext-sentitiveandsometimesquitesubtleways–mushlikenaturallangu

3、ageMathematician(数学家)Python:HighdegreeofuniformityOrthogonaldesign设计理念DesignPrincipleofPerlZenofPython(TimPeters)There’sMoreThanOneWayToDoItEasythingsshouldbeeasy,andhardthingsshouldbepossibleBeautifulisbetterthanugly.Explicitisbetterthanimplicit.Simpleisbetterthancomplex.Complexisbetterthancompli

4、cated.Flatisbetterthannested.Sparseisbetterthandense.Readabilitycounts.Specialcasesaren'tspecialenoughtobreaktherules.Althoughpracticalitybeatspurity.Errorsshouldneverpasssilently.Unlessexplicitlysilenced.Inthefaceofambiguity,refusethetemptationtoguess.Thereshouldbeone--andpreferablyonlyone--obvio

5、uswaytodoit. Althoughthatwaymaynotbeobviousatfirstunlessyou'reDutch.Nowisbetterthannever. Althoughneverisoftenbetterthan*right*now.Iftheimplementationishardtoexplain,it'sabadidea.  Iftheimplementationiseasytoexplain,itmaybeagoodidea.Namespacesareonehonkinggreatidea--let'sdomoreofthose!Fundamentalp

6、rinciplesofhumanlanguage(I)ExpressivenessismoreimportantthanlearnabilityIt’squiteOKtospeakin“babytalk”ifyouhappentobeababyAlanguagecanbeusefulevenbeforeyouhavelearnedthewholelanguageThereareoftenseveralgoodwaystosayroughlythesamethingEverylinguisticutterancegetsmeaningfrommanycontextsatonceEffiice

7、ntcommunicationrequiresacertainamountoflinguisticcomplexitySemanticnetworksdonotgennerallymapwellintoorthogonalspacesShortcutsabound;commonexpressionsshouldbeshorterthanuncommonexpressionsFundamentalprinciplesofh

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。