[PyWX] Re: Choice of language

Chuck Esterbrook echuck at mindspring.com
Thu May 18 09:25:00 EDT 2000


Titus Brown wrote:
> 
> -> Chuck Esterbrook writes:
> -> > Given the success, maturity, functionality and stability of the
> -> > Python programming language, as well as the ease of embedding and
> -> > extending it, has anyone in the Latte community considered creating
> -> > a Python version of Latte?
> ->
> -> Well it certainly sounds like you have!
> 
> [ munch ]
> 
> I'm not sure what Chuck was suggesting: there are two options, right?
> 
> Write a Latte parser in Python; this would let many Web servers
> incorporate it easily, not the least of which would be AOLserver.
> 
> Separately, adapt the Latte language to a Pythonesque syntax, which it
> sounded like Chuck was suggesting.
> 
> I am very much in favor of the first; the second sounds a bit more
> difficult to do cleanly.

I agree with Titus. I wasn't planning on mixing existing Latte syntax with Python code, although anyone who wants to do it can certainly pursue it. :-)

I was looking for people's thoughts on the subject, which I got.

There's another approach besides Latte which is the ASP/PHP/JSP approach (which I'll call *SP) characterized by <%= %> for expressions and <% %> for statements.

I've been thinking more about Latte vs.*SP and my impression is that Latte is geared more towards writability and readability of source for use in creating documents where as *SP is geared more towards programmatic, dynamic pages dished out by a server. However, there is certainly overlap in the two systems.

I certainly like the readability of Latte _content_ (e.g., the body text and so on) but the code definitions with all their \s and {}s (mostly the \s) looks pretty horrendous. Plus, as I stated, I try to avoid implementing new mini-languages if I can help it (e.g., I prefer to use Python).

However, the Latte language does something special which is to allow regular content in the middle of the source code which gets included verbatim. I guess this is what makes it embeddable and what therefore makes it non-amenable to just saying "hey, substitute Python in there and it'll be better" (you *can* say that when you look at PHP).

I have an idea for an alternate version of Latte that would have cleaner syntax, less syntax and use Python for function definitions, but I need to work out the ideas. I'll follow up within the next week when I've got something presentable.

-Chuck
____________________________________________________________

http://webware.sourceforge.net




More information about the Python-list mailing list