[PerlChina] Perl with opensources

Achilles Xu formalin14 at gmail.com
Mon Oct 6 00:19:23 PDT 2008


perl是一门类似c++的语言,可以通过高级技术来自醒和重载语言特性。

perl可以自醒,可以oo,这毋庸置疑,只是用户体验如何呢?python的新手,处处在使用自省,而不知道其存在。他们确实能够在写超级简单的程序的时候用到动态和自醒带来的便利。对他们来说,也许"动态类"这个概念会更容易理解一些。特别是对于javascript程序员来说,python的oo模型非常亲和。

我希望更多地讨论一些实际使用的感觉,而不是互相的功能比较,对于通用目的的编程语言,其实谁也不比谁少什么东西。

恰如你提到的场合,带出了各种编程语言推荐用户的思维和编程方式。python希望用户(包括初级用户)用着很动态,而perl是另外一种感觉,perl一般是两分钟写出一个面向过程的程序,想哪写哪。

2008/10/6 agentzh <agentzh at gmail.com>

> 2008/10/6 agentzh <agentzh at gmail.com>
>
>> 2008/10/6 Achilles Xu <formalin14 at gmail.com>
>>
>>>
>>>
>>> 关于perl和python,从表面或者纯理论上看,python是比perl要动态好多。perl里高深的glob/符号表技术,在python里是非常基本的自醒能力。
>>>
>>
>> 不太认同 python 比 perl 动太好多的提法。。。虽然我不是 python 程序员。自省在 perl
>> 里比较奇怪是因为语言设计者当时认为只有高级程序员才用得着它们,所以把接口设计得奇怪一些,以免初学者滥用(当然了,这只是一种解释),呵呵。
>>
>
> 忘了提了。。。CPAN 上有 Class::Inspector 模块(Alias++),提供了用户体验更好的自省接口,我在自己的
> UML::Class::Simple 模块中大量使用了 Class::Inspector,毕竟那个场合就是玩自省的,为了从 Perl 类库直接生成
> UML 类图嘛!呵呵
>
> Cheers,
> -agentzh
>
>
> _______________________________________________
> China-pm mailing list
> China-pm at pm.org
> http://mail.pm.org/mailman/listinfo/china-pm
>



-- 
---------------------------
Achilles Xu
http://www.lostcode.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/china-pm/attachments/20081006/71600de8/attachment.html>


More information about the China-pm mailing list