Be gentle with me....

ajmayo at my-deja.com ajmayo at my-deja.com
Fri Dec 3 10:20:18 EST 1999


I know you are all tired of newbies asking what Python is like as a
scripting language, so I won't come at you from that track. No, after
lurking for all of five minutes, I see you're an affable bunch of
characters (and appear to have perhaps more of a sense of humour than
aficionados of a certain other language beginning with p..., who have
not always appreciated the spirit of my questions on *their* newsgroup).

Where I'm coming from is this. I am building web-enabled applications
that currently use Apache, with server-side perl and the wonderful
Apache::ASP module which gives me the functionality of Microsoft's IIS
Active Server Pages, but in an Open Source environment.

Client-side, I'm using Javascript. Now, the thing is..... I don't like
perl very much (there, I've said it!). Don't get me wrong, lurking perl
fanatics. I've already expressed some constructive criticism on *your*
home territory and you told me what you thought about my opinions. If I
had to summarise my feelings on perl, they'd be

<I know, this is a Python group - bear with me, please>

1. I hate, oh how I hate, the metacharacter at the front of every
variable which defines its type.

2. I deeply dislike the inadequate debugging messages. 'missing
bareword at line 193'? Gimme a break!. Since my code is embedded server-
side code evaluated at runtime, where *is* line 193. Who knows?

3. It doesn't seem to be easy to create the equivalent of C structs
where member assignments can be checked AT COMPILE TIME (sorry about
the shouting, there, but I think lists of lists and all that don't
really hack it, in this context, and objects are simply overkill. I
just want a goddamn structure).

Ok, that's perl. Now, Python. Why the interest.... well,I've discovered
Zope. This looks like a mighty fine piece of work and I am very
interested.. but it revolves around Python - sort of a Python 'killer
app', if you know what I mean. So if I want to buy into Zope, I'm
buying into Python as a scripting language, unless I want to fight it,
and what's the point of that?

I already knew about Python and I like what I have seen... except for
one thing. The indentation that marks block scope. This seems to me a
really strange idea in that having whitespace be significant is a
totally alien concept in most modern programming languages.

Reading some sample Python code, as a complete novice, I like the look
of the syntax, which appears to be clean and elegant (I like Javascript
very much for the same reason).

Apart from the indentation, that is. I had trouble seeing where block
scope ends. And if I were dynamically creating code to be runtime
evaluated, how would I handle this easily - do I *really* have to emit
tabs and/or the right number of spaces for each line of code. What if I
want to continue a line of code over multiple physical lines?

So tell me, Python aficionados.

1. Will I get over my initial confusion?. (can I use braces, or
BEGIN/END - I presume not)

2. Does the debugger report context as in

foo=bar + splat
      ^  undeclared variable bar

(oh, please tell me it does, even for runtime evaluated code!)

because if it says

Syntax error at line 345. Program terminated

then I will scream....

3. Can I create something analogous to C structs (and arrays of same)
without recourse to object overkill. The Javascript approach is fine,
mind you. It's very elegant, actually. I get the impression Python is a
bit like that.

4. Is anyone here also using Zope. What do you think of it?

5. Is there a plug-in scripting language interface from Internet
Explorer to Python, as there is for perl (ActiveState), so that if I
wanted I could write client-side Python?. (because I'd really like to
get down to a single scripting language client and server-side, and
although that could be perl, frankly, my colleagues don't like the
taste of it so much).



Sent via Deja.com http://www.deja.com/
Before you buy.




More information about the Python-list mailing list