>From [EMAIL PROTECTED] Thu Aug 03 10:09:09 2006
Received: by 10.78.131.5 with HTTP; Thu, 3 Aug 2006 10:09:08 -0700 (PDT)
Message-ID: <[EMAIL PROTECTED]>
Date: Thu, 3 Aug 2006 10:09:08 -0700
From: "kirby urner" <[EMAIL PROTECTED]>
Subject: Re: [wwwanderers] Language question for Kirby


> I know that Kirby is a dyed in the wool Python devotee. However there is a 
> confusing
> array of open source scripting languages out there. In addition to Python 
> there are Perl,
> PHP, and Ruby. There are probably others that I am not aware of. Can someone 
> give
> a quick rundown of the pros and cons of each? Are there niches where one is 
> better
> than the others? Is there one that is universally superior? Inquiring minds 
> want to know.

Hi Allen --

[I'm fumbling around to change my email address to Google's gmail...
better than Princeton's Tigernet for spam filtering and web emailing]

We (the hive mind, borg, royal we or whatever) prefer not to call 'em
"scripting languages" anymore, as that connotes "only good for slap
dash shell scripts like in bash" i.e. "doesn't scale" -- which is a
misleading impression (Java marketing might still be pushing the
"scripting" label for that reason)...

We like "agile languages" or "dynamically typed", meaning they support
late binding, introspection, the ability to write new code and execute
it on the fly, at run time. None of this declaring types in advance
and compiling BS, like in Java or C++ (the so-called system language
-- oft used to implement more dynamic VHLLs (e.g. there's a version of
Python written in Java, called Jython)). VHLL = very high level
language.

Yes all that agility comes at a price, slows it down some, but whose
time is more valuable, the busy human's, trying to get work done,
maintain and recycle code, or the CPU's, cheap cheap?

Agile languages are blazingly fast for most workaday applications. If
there's really a time-critical bottleneck, there're ways to write just
that part in a "system language" (closer to the metal) and invoke that
from within your agile bowels (eew).

In a web context, if you have high volume traffic, you don't want
Python or Perl loading and unloading from memory all the time, so
Apache provides various modules for keeping that from happening.

PHP's whole original reason for being was to code web sites on the
server-side (Javascript and Java applets being client-side in contrast
-- Java is server-side too of course, Tomcat etc...).

The hallmark of an agile language is it "compiles" to byte codes, a
small instruction set more like assembly language, but targeted to run
on a Virtual Machine (VM). It's this VM that gets customized for
different operating systems, so the byte codes don't have to change
e.g. when moving from Linux to Windows to Unix to BeOS etc.

Java is like this too, and you've likely heard of Microsoft's "dot
net" (.NET): another VM, the Common Language Runtime (CLR) providing
the byte codes. There's a new version of Python out there, written in
C#, that compiles to .NET, or, on the Linux side of things, to Mono
(the open source implementation of the .NET open standard).

Perl is undergoing a big revamp these days (to versions 6.x), and
plans to emerge more agile than ever.

Perl is the huge big brother community at OSCON, with lots of geniuses
and superstars, many of whom are right here in Portland (Randal
Schwartz of Stonehenge, also the yaml.org guy, Brian, some of the
Naked Ape people [1]...).

Python is still evolving too, making the big leap to Python 3.x (which
will break backward compatibility) in the next couple of years. But
Guido emphasizes this leap is nowhere near as big as Perl's.[3]

Ruby has gotten pretty big pretty fast, thanks largely to Ruby on
Rails (see July issue of Linux Journal).

PHP I know a lot less about.

Now, to my own biases. As you say, I'm a snake charmer, a citizen of
Python Nation, so those are the memes I most know to spread. In
Python's favor: it was object oriented from the beginning and
implements that paradigm very cleanly. Perl bolted that on later,
with the "bless" key word. Ruby, on the other hand, is maybe *too*
agile, what with mutable strings and classes you can keep messing
with, anywhere in the code.[2]

What's also going for Python is a critical mass bandwagon effect where
companies are realizing the advantages of exposing "Python bindings"
to their various engines. Some Nokia cell phones give users a Python
API for writing cell phone applets. Games like Civilization IV and
Unreal Tournament (? not so sure about UT).

A generic library used by 2D gamers is called SDL, and Pygame gives
snake charmers access to that library. 3D gamer coders tend to use
OpenGL. That's harder to master, but here again, Python comes through
with VPython, notable for its very simple API (3D coding for mere
mortals). This is what I used for my HexaPent Studies with Glenn.
For full OpenGL, there's PyOpenGL.

In sum, I think all of these languages have a bright future, even as
newcomers continue to crowd the scene. The world of computer
languages is rather ruthlessly Darwinian; making it in the real world
outside academia (home to many "toy languages") is a tough row to hoe,
and you can be sure those that made it are pretty robust and reliable,
good at what they do.

All of these languages come with excellent free documentation, plus
the languages themselves are free (and open source).

Other exciting languages: Haskell, J, Ocaml, plus LISP and Scheme
still attract large followings of nerdy theoreticians (I find these
less practical for my needs, plus the Scheme people come across as too
snobbish).

Kirby

[1] Naked Ape Consulting (member of POSSE, like my 4D Solutions):
http://www.news4neighbors.net/orgs.pl?op=org_view&org_id=173

[2] Re: OSCON 2006, a journalist chatting with Guido:
http://business.newsforge.com/article.pl?sid=06/08/01/1234216&tid=18&tid=138&pagenum=1

[3] Highly technical comparison of Python with Ruby:
http://www.trug.ca/Alex_Martelli's_Python_vs_Ruby_newsgroup_posting
_______________________________________________
Edu-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to