Number of languages known [was Re: Python is readable] - somewhat OT

Chris Angelico rosuav at gmail.com
Mon Apr 2 17:50:39 EDT 2012


On Fri, Mar 30, 2012 at 2:48 AM, Steve Howell <showell30 at yahoo.com> wrote:
> I agree with you on the overall point, but I think that Python
> actually does a fine job of replacing REXX and PHP.  I've used both of
> the latter (and, of course, Python).  REXX and PHP are great at what
> they do, but I don't think their slight advantages over Python justify
> all the weight they carry--incompatible syntax to Python, archaic
> libraries, missing modern language features, etc.

I think you're probably right about REXX, mainly because it's somewhat
old now. It was an awesome language when I first met it back in the
1990s; it tied in very nicely with OS/2, it was (and is) easy to
extend and embed with C, it had excellent GUI facilities (as long as
you don't need it to be cross-platform). But today, REXX is somewhat
outclassed. I don't recommend it to people for most tasks, unless
they're actually on OS/2 (in which case they probably know it
already). Unicode support and cross-platform GUI toolkits would
probably be REXX's two biggest lacks.

As to PHP? I don't think it's "great at what [it] [does]", frankly. At
least, it's not great at what it's often used for. PHP is adequate as
a "variant of HTML that allows scripting", but it's usually used today
as though it were a CGI script, and for that it's less than optimal.
For instance, you can't have an include file without it also being an
entry point of its own (eg someone could go to
http://www.example.com/common_functions.php), so you need code to
protect against that. Huge frameworks have such code peppered
throughout.

(As a side point, I don't believe that a web server's CGI scripts
should be updated simply by writing to the disk. It's pretty easy to
get non-atomicity problems when you have a page and its include file.
There ARE other options, but I don't know of any efficient ways to do
it in Python.)

> Python should also be a perfectly good superset of Bash Scripting
> language.  (To the extent that Python isn't, there's nothing intrinsic
> about the language that prevents you from orchestrating processes.)

Hmm... How do you pipe one command's output into another's input using
Python? It's not nearly as clean as it is in bash.

> I think the problem these days is that the programmer's brain is like
> a small toolbox.  Maybe twenty tools fit in the toolbox.  Instead of
> filling it up with 20 useful tools, a lot of us have it cluttered up
> with ten hammers, when only one of the hammers is what we need for the
> nails.

Maybe. But you can also have a little catalogue in there that reminds
you of the tools you have in your shed. If you keep that catalogue up
to date and accurate, you can hunt down those tools you seldom use
when you need them.

ChrisA



More information about the Python-list mailing list