The Artima Developer Community
Sponsored Link

News & Ideas Forum (Closed for new topic posts)
The Zen of Python

7 replies on 1 page. Most recent reply: Jul 10, 2003 4:40 PM by Isaac Gouy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 7 replies on 1 page
Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

The Zen of Python Posted: Jun 23, 2003 2:15 PM
Reply to this message Reply
Advertisement
Bruce Eckel says, "One of the things I find that's remarkable about Python is that it has a very even learning curve. Maybe it's not even a curve, It's kind of a straight line. Learning Python has a zen-like quality, because Python doesn't try to make the world something else."

Read this Artima.com interview with Bruce Eckel:

http://www.artima.com/intv/prodperf.html

What do you think of Bruce's comments.


Carfield Yim

Posts: 32
Nickname: carfield
Registered: Sep, 2002

Re: The Zen of Python Posted: Jun 24, 2003 1:42 AM
Reply to this message Reply
According to the professor in my university, Smalltalk is the first language introduct the concept of metaclass, which java (and many other high level language or script) is actually just borrow the idea from smalltalk, is that true?

Tiago Antao

Posts: 26
Nickname: tiago
Registered: Feb, 2003

Re: The Zen of Python Posted: Jun 24, 2003 8:13 AM
Reply to this message Reply
Although I like Python (language, philosophy and culture), I am not very experienced at it (I never worked in place where it was the "official" language, so I use it mainly for small throw away stuff), I am far from being an elegant Python programmer.

Can anyone with more experience with Python (like 90% of you reading this) comment on Domain Specific Languages and Python?

Does it have any facilities that normally come bundled with functional or logic languages for the support of DSLs?

I have the feeling that that is missing from Python, but as I have seen so many wacky (read: intesting) things being made with metaclasses that I might be wrong.

Maksim

Posts: 1
Nickname: maksim
Registered: Mar, 2003

Re: The Zen of Python Posted: Jun 25, 2003 1:49 AM
Reply to this message Reply
As for DSL, important feature of a DSL is customized syntax, tailored for the domain. Languages like Ocaml, Haskell, Lisp, Lua are better in this regard because they allow to change the syntax more radically.

Still, I think Python can be good in implementing DSL because it possesses other important properties: simplicity, power, ease of C integration and rich standard library.

Joe Cheng

Posts: 65
Nickname: jcheng
Registered: Oct, 2002

Re: The Zen of Python Posted: Jun 26, 2003 3:26 PM
Reply to this message Reply
Just want to point out what many static typing "bigots" are probably already thinking... declaring variables and using static type checking are, for those who like such things, much more of a productivity aid than performance optimization. They let you leverage the compiler to find bugs before your program even runs--especially the kind you are likely to introduce when refactoring (i.e., renaming a method or modifying a class hierarchy).

A better example might be how not everything in Java is a reference type (i.e. "object"); I believe the value/reference typing model was purely for performance...?

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: The Zen of Python Posted: Jun 26, 2003 3:35 PM
Reply to this message Reply
> A better example might be how not everything in Java is a
> reference type (i.e. "object"); I believe the
> value/reference typing model was purely for
> performance...?

Yes, that is a better example, and your abolutely right. Gosling said exactly that in this interview. Look for "Primitive types versus wrapper types" about halfway down the page:

http://www.artima.com/intv/gosling313.html

Doug Tillman

Posts: 4
Nickname: vtecinc
Registered: Feb, 2003

Re: The Zen of Python Posted: Jul 10, 2003 1:52 PM
Reply to this message Reply
Bruce comments that Zope is faster than Apache on his machine. I'm starting to work with Plone which is a Python based Content Management System that lives on Zope. Plone's manual states that one of the performance optimizations is to place static content on Apache. I think that if Zope were truly faster than Apache that this wouldn't be a recommended performance enhancement.

Perhaps Bruce just meant the start up of the application itself rather than how it performs.

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: The Zen of Python Posted: Jul 10, 2003 4:40 PM
Reply to this message Reply
Smalltalk is the first language to introduce the concept of metaclass
Smalltalk-72 didn't have metaclasses. They were introduced with Smalltalk-80.

See
http://www.ifi.unizh.ch/richter/Classes/oose2/05_Metaclasses/02_smalltalk/02_metaclasses_smalltalk.html

Flat View: This topic has 7 replies on 1 page
Topic: Distributed Computing Economics Previous Topic   Next Topic Topic: A Design Review of JDOM

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use