> Bruce Eckel 对于Python的一些观点 (zt)

 
Thinking About Computing
Articles by Bruce Eckel
Formerly Web Log, see new web log

7-02-03 Python Answers

  • Do you think Python is good enough for large projects?
Absolutely. I would argue that Python is better for large projects. Zope is probably the best-known large project created in Python, and there are a fair number of busy commercial sites built on Zope. Many people don't know that much of Google is written in Python. There's a game called Blade of Darkness that uses several megabytes of Python scripts, and a game framework to create 3-D interactive games called PyGame. Here are some links that list significant projects built in Python:

I believe that Python is one of the best possible choices for building a system -- you can create the system faster than anything that I know of, so you get it working in much shorter order than with other languages. It's very possible it will be good enough the way it is, but if not you can performance-tune it by writing bits of C++ code (after profiling, of course) and connecting them with Boost.python.


  • What are your views on Python for Object-oriented programming?
I can only say that I like it and use it for OO. Python was designed from the ground up as an OO language, and it's OO support has been improving in recent releases, including support for private fields and static methods. Also, you can do a lot more OO stuff with Python than with languages like C++ and Java, because Python has metaclasses. Finally, the "latent" or "weak" typing mechanism in Python makes OO programs much simpler to write, which means you can be more productive.


  • How do you see the future of Python in terms of penetration into the programming world?
I think as people begin to understand what they're really trying to do (create good, maintainable code, fast, so they can be competetive in the marketplace) and how well Python supports that, more people will continue to move to Python.

Because Python hasn't been an official language of any one company (contrasted with Java and C#, for example) there hasn't been any marketing branch telling you how wonderful the language is. People have learned on their own and told others, etc., so the growth of the language hasn't been this big jump like when a company gets behind it and is willing to tell you anything to get you to adopt it. We don't do that in the Python community. Tim Peters (one of the core team, often rumored to be a robot, but I've spent time with the real version so I can attest that if he is a robot he does have a flesh proxy) is famous for encouraging people not to use the language if they don't like it (imagine what would happen if someone did that for one of those other languages. Or better, try it yourself and feel the heat from the true believers).

At the last Python conference, Kevin Altis and some others announced that they wanted to be more active in promoting Python, and are moving in that direction. Here's a Weblog entry from Kevin about Python and where it has been successful in large projects.

And it's also worth noting that Python is a favorite of Eric Raymond, author of The Cathedral and the Bazaar, and one of the leading advocates for open-source. The story and tutorial of how he came to use Python is here.


  • There is also this huge Web Services momentum in the industry. Do you know if we can do quality web services in Python? If so, could you send me some instructions to build one?
XML-RPC is a standard Python Library that comes with the distribution ( xmlrpclib). There's both DOM and SAX XML libraries, also standard. Using Google, I found Soap for Python. As a starting point, you might try the book Python Web Programming by Holden, from New Riders.


  • What's your opinion of Zope as an application server?

I've been using Zope on this server for several years now. It took awhile for me to settle on Zope, and much of the choice was because it was written in and uses Python. Before that I was using Apache and writing CGIs first in C++, then in Perl, then in Python. The primitive nature of that setup was actually helpful at first because it gave me a solid grounding in what was going on, but it also rapidly became tedious. Zope is definitely a higher-level way to do things and a better approach to an application server than the alternatives, which always feel like cobbled-together collections of existing tools.

I've become very fond of Zope because I can try things out without much effort. However, the Zope2 learning curve gets suddenly steep and there are a lot of disjoint places. Fortunately, Jim Fulton and the Zope team know about and agree with this, and the prime goal for Zope3 is to make it programmer-friendly. It's a big project but I think they're doing it; I participate in the Zope3 sprints whenever I can in order to seed the ideas in my mind.

I got past enough of the learning curve that I can tap into the power of Zope2 when I need to, so naturally I'm rather tied to it. However, I'm looking forward to the much greater possibilities of Zope3, and I think when that comes out it will be much more accessible for larger numbers of programmers.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值