Monday, March 10, 2008

A look at Python

Python, like asp, is a formidable looking snake. Why does a programming language named after such disgusting creatures? My theory is that it is named as so because of asp, which stands for Active Server Programming. But it isn't an exact competing product of ASP like JSP. Computer programmers love to use cute acronymns. An older example is elm (electronic mail) vs pine (pine is not elm) as email programs named after trees, and struts and spring as Java frameworks named after components inside your car.

Anyway, python is a general purpose, OO language with an interactive mode.
I am looking at the Pyton tutorial here. It is a lot like ruby with more intuitive syntax. The syntax is like that of C, with a notable differnce that it has no blocks and it uses indentation instead. Yikes, debugging can be a nightmare because of a missing tab. It seems like most people like the C syntax, but want to invent languages to handle lists and revolt against the rather strange for-loop in C. It's got many C related things, such as __FILE__ and __LINE__, and the printf parameters. Python has a lot of list proccessing functions built in. Whoa it's got complex number type built in! Is it the only language besides FORTRAN that has this type built in? Fractal programmers anyone?

It's got rather strange syntax for constructors, and it's got multiple inheritance.
Many packages included, including xml handling. It even comes with a GUI library: Tkinter. It is like a basic GUI system like AWT for Java except that it makes desktop app and not web app. It seems rather clunky to create a full featured desktop app with it.

So I see Python is a rather powerful, reasonably easy-to-learn, general purpose language. It is sort of like C/C++ loaded with list handling functionality. Purist will demand the speed of a compile language. You may not need this language if you already know other languages. Interesting fact: Google's hiring ads says it likes to hire people with Python experience.

2 comments:

Alex Mak said...

I went through several Python books. python is neat but the syntax is too odd. I don't see a lot of use for Python in the work that I do.

Anonymous said...

Thanks for writing this.