On Thu, Jun 2, 2022 at 7:35 AM Patrik Schindler <poc@xxxxxxxxxx> wrote:

[...] I prefer the matured Perl environment over the still relatively new Python [...]
Perl, the language, is not that much older than Python (1987 vs. 1991), especially when you consider that the younger one is 31 years old. If you mean PyPI is relatively new compared to CPAN, that's a bit more apt, but PyPI is still nearly 20 years old, which I don't think many people would consider "new". Or perhaps by "mature" you mean "having very little active development"?

Perl has been *the* choice for CGI programming in the internet's early heydays, at least in Europe. Nobody mentioned Python back then.

I think the situation was the same everywhere, not just Europe. But
we're no longer in the early heydays, and haven't been for many years.
Depending on how you define "early heydays", one could argue that CGI
was only popular then, and has long since been out of favor.

Also, I observe that Python gained considerable hyping in the last 5 years or so. Considering the long-before existence of Python, I wonder why that is.

Python's growth pattern has indeed been unusual. It has hung around,
gradually gaining traction, until suddenly it somehow reached a
critical mass and then took off like a hot, new language. It just
happened to be a newly hot, old language.

On the other hand, from my own, and colleague's experiences, Perl has been Linux Sysadmin's Choice for automating things which become too cumbersome (or slow-running) in shell for a long time.

You mean it *had* been the sysadmin's choice. Even long before Python
took off, it had already surpassed Perl as a pure scripting language.
(And PHP surpassed it for web programming.)

This is where my opinion about maturity stems from.

Right. I don't mean any disrespect, but from "inside" the pro-Perl
community, it probably does seem like *still* *the* choice for the
things it used to be popular for. It's a bit like RPG people talking
about how in the last few releases, the language has finally acquired
features that have been common outside the IBM midrange community for
decades, but without the awareness that RPG's new features are old
hat.

I guess Python must have some advantages over Perl, but I just can't see it. :-)

There is this famous webcomic:

https://xkcd.com/353/

Note that the hover text says "I wrote 20 short programs in Python
yesterday. It was wonderful. Perl, I'm leaving you."

Basically, if you ask almost anyone who knows both Perl and Python,
they will choose Python. And this has been the case for a long time.
(Note that the webcomic cited above appeared in 2007.)

The advantages of Python are numerous. First and foremost, as a
general-purpose programming language, its syntax is near-universally
regarded as far more readable. It is also near-universally regarded as
easier to learn and become productive in. Then there is the ecosystem.
As I mentioned, CPAN is moribund compared to PyPI.

I think that objectively speaking, Perl is handier than Python for
some sysadmin tasks. A Perl expert's sysadmin scripts will definitely
be more succinct than a Python expert's sysadmin scripts. But if you
have the time and brainpower to learn just one language, Python is
both easier and more broadly useful. And it's not *that* much worse
than Perl even for sysadmin scripts and CGI.

people are talking about passing parameters to a called program, and the called program returning data via assigning values to those parameters. It would be handy for Python programs to have output parameters in the same way that CL and RPG programs have output parameters.

Parameters — as I know — are command line switches I give to a program to modify its runtime behavior. By nature, these are some kind of "input". Given this picture, I simply don't understand what is meant by "output parameters". :-)

I was not aware that you are unfamiliar with the OS/400 notion of
programs and parameters. Most of the original discussion is predicated
on this supposedly common knowledge among IBM midrangers.

From your explanation above, I guess you're maybe talking about a shared memory space where the callee can put in results, to be worked with by the caller. Yes?

You could say that. In short, pass-by-reference is the default for
programs written in CL or RPG.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.