Python and C as web-based languages? Shoot me!
I’ve been hacking lately at the official Purdue installation of Zope, a fiendish piece of software designed to limit users to only using Python as their backend language (instead of giving us some PHP access). I’ve found Python as a web language to be overly, well, stupid. I hate the locked down nature of the server in general and the python aspect of it is, in my perspective, ridiculous. But now slashdot has brought news of the latest adoption of a programming language to the web: bringing C code to the server. Please just shoot me. Please, I beg of you.
First of all, I must admit–the idea of making C code to run on the web is more appealing than Python to me. Maybe I ‘get’ C better, maybe it’s the fact that Python makes me hate life, or maybe I am just partisan to good programming languages–who knows? Either way, I just don’t get why people are always trying to move away from languages like PHP which were built to do this. Do you understand? PHP was made for the web. C and Python were not (they appeared on the scene in 1972 and 1991, respectively). Why do you insist on running those for the web? Is it the same kind of mentality that drives people to run Linux on refridgerators? Do we just have to prove that we can run anything as a web language? When do I get my Web-Fortran (and yes, I’m sure it exists somewhere)?
That all being said, this implementation seems quite interesting. The programmer would write his C code and then compile it. It would be compiled into a special format for a Virtual Machine. This would then be converted into code for ActionScript, which is what Flash uses to code it. This scares me on one hand–god knows Flash is whored out too much as it is–but it’s still very interesting theorhetically. That being said, once I am forced to write some software in C to be used on the web I think I will go ahead and just stop programming for good. I understand that the C code could quite possibly be faster than cooresponding PHP code… but the C code would have to be put into flash which completely kills any of that benefit for the end user. Arrrgh.
Be sure to differentiate between the language and the framework. I think Zope is huge and a bit esoteric, but very well abstracted. I can’t stand when people mix their presentation, layout, and application logic as they often do in PHP.
The python language itself has a lot of features that I like: metaclasses, functions as first-class objects, introspection, duck typing, etc. IPython is also great for debugging and interacting with your code. It may be just me, but I program much more effectively in Python.
Comment by Daniel — July 8, 2008 @ 8:33 pm
There are two sad statements here. One is that PHP, while entirely built for the web (and not horrible in performance anymore) still does things in a very clunky manner. It is obviously suited for linear scripting (which makes sense — a pageload is a pageload) but could use better OOP support for a number of reasons. The other thing is that Ruby is a wonderful little language with heaps of potential, horrible documentation, and inconsistent interpreters. It would make for a great web language in and of itself, if fixed up a bit. (Rails need not apply.)
Comment by Jeff Nadeau — July 9, 2008 @ 12:38 am
Dan, good point on differentiating between the language and the framework. I mainly threw in the part about Zope because of my current frustrations with the software. Python is one of those languages that I would imagine that I would like if I spent more time with it… but I still don’t feel that it is really that strong for a web-based language (especially if you’re not going to use AJAX or whatnot to get the output of the code).
That being said, Jeff makes a very good point about PHP being clunky… it really is. It’s almost sad once you start comparing it to other languages that were built before it. Hell, even RoR is better than PHP in terms of streamlining (in my opinion).
Comment by Jason Young — July 9, 2008 @ 12:48 am