Python article in Free Software Magazine

bonono at gmail.com bonono at gmail.com
Sun Jan 1 05:55:01 EST 2006


Steven D'Aprano wrote:
> On Sat, 31 Dec 2005 14:42:36 -0600, Kirk Strauser wrote:
>
> > I wrote this article which was published in Free Software Magazine:
> >
> > http://www.freesoftwaremagazine.com/free_issues/issue_09/intro_zope_1/
> >
> > It's intended as a high-level overview of the language, and therefore
> > glosses over some of the details.  For example, I describe its function
> > calling mechanism as pass-by-reference, because that's close enough for
> > newcomers to get the gist of it.
>
> Then what you are describing is not Python, it is some mythical language
> that is almost like Python, but just enough like C to confuse programmers
> who think they have discovered a bug when the following doesn't work:
>
> def increment(n, inc=1):
>     n += inc
>
> n = 1
> increment(n)
> assert n == 2
I assume you mean C++, not C. As in C

int n=1;
void increment(int *n)
{
  n+=1
}
assert(n==2);  /* this one would fail */

Behave exactly like your sample.

>
> I don't want to nit-pick all my way through the article, which
> is very decent and is worth reading, but I will say one more thing: you
> describe Python as "an expressive, interpreted language". Python is no
> more interpreted than Java. Like Java, it is compiled into byte-code which
> is then executed by a virtual machine. It has a separate compilation and
> execution step.
>
> (Amazing how the Java virtual machine is one of the great buzz-word
> selling features of the language, and yet Python people take it utterly
> for granted.)
>
> We both know that rational people shouldn't care about the difference
> between compilers and interpreters: it is performance that counts, not
> how you get it. We know that Python doesn't literally analyse the source
> code over and over again, and no major interpreted language has done this
> for probably two decades or more. We can argue about the differences
> between interpretation, tokenization, compilation and execution, and
> pedants like me will mention that machine code is interpreted by the CPU.
>
> But sadly, many decision makers don't understand these subtleties. To
> them, compiled languages like C++ and Java are Good, interpreted languages
> are Bad and doomed to be slow and weak. As soon as you describe
> Zope/Python as "interpreted", you turn off maybe 25% or 50% of the Pointy
> Haired Bosses who are making the decision of what technologies are used.

I don't see that as a problem. In fact, it alarms them the right way.
For those who don't care(I met many who don't, so long the technology
delivers the end result, they don't want to know the difference or the
buzz words), it doesn't matter. For those who knows a little bit(even
not the detail) and care, this "interpreted" term gives them the right
reason to ask :

1. would that be slow ?
2. does it mean the source cannot be reasonably seperated from the end
product ?




More information about the Python-list mailing list