On Tue, Jun 7, 2022 at 6:43 AM Patrik Schindler <poc@xxxxxxxxxx> wrote:
What I wanted to say: I fail to see a clear "pro" for learning a new language syntax (Python) over Perl which largely can be written to look like well-established C code.
I think people already proficient in Perl, and find that it suits
their needs, do not have much reason to learn Python or any other
language of similar capability (such as Ruby, for example).
I think the resemblance of Perl to C is highly subjective. I
programmed exclusively in C during my undergraduate years, and I found
that typical Python code seemed more C-like to me than Perl code.
And note that you said Perl *can be* written to look C-ish. Part of
Perl's philosophy is to not be restrictive about style, and so it
would be just as easy (and turns out to be quite common in practice)
to write Perl that is extremely un-C-like.
When it comes down to it, Perl and Python are both so different from C
that either could seem utterly foreign to a C programmer. And
practitioners of very un-C-like languages (such as Scheme or Haskell)
tend to see Perl and Python as "basically the same thing, with
superficial differences" and both of them very related to C in terms
of underlying philosophies and overall mental approach to programming.
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.
Depends where you look. On this side of the pond, and with my experience, things are a bit more traditional outside of cool and hip startups.
You could say that everything outside of "cool and hip startups" is
*by definition* more traditional. You can easily find traditional
businesses and IT in North America, and of course plenty of them
started using Perl when Perl was popular and never switched to
anything else, so they still use Perl today. I should have said that
among newer companies (whether "cool and hip" or not), as well as
newer IT staff, Perl is no longer the dominant choice.
There was a poll from German Magazine c't about corporate usage of Python in April.
38%: as a secondary language in projects
27%: no Python
18%: as primary language in projects
17%: no Answer.
OK, that all seems unsurprising. What are the results of the same poll
about corporate usage of Perl?
"No reason to use python" has been given quite often. For once because introducing yet another language into the pool doesn't help with overall complexity, and also for compliance reasons. Also, "problems with updates" was a frequent reason to not use Python. Others argued that there is no apparent benefit compared to the existing languages being used (Java, Perl, PHP).
There is always a significant cost to introducing a new language. But
this only says something about incumbent languages, not anything about
Perl OR Python.
Ask yourself this: If a shop is already using Python but not Perl,
what reason do they have to introduce Perl into the mix?
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.
I'm very attached to C, maybe this is one of the reasons I disagree with this claim.
You are disagreeing with Python being more readable than Perl. For
yourself. That is fine, and doesn't refute *my* claim which is *not*
that Python is definitively more readable than Perl. My claim is that
Python is *regarded by* the vast, vast, vast majority of people to be
more readable than Perl.
If you ask people who know neither language, or know both languages,
you will see what I mean.
And if you ask people who use programming languages for tasks other
than administration of a Unix or Linux system, the results will be
even more starkly stacked against Perl.
But if you have the time and brainpower to learn just one language, Python is both easier and more broadly useful.
Mh, you have a point.
And that was my *whole* point. I think your arguments come from
perceiving that I am somehow attacking Perl, or attacking you. Or that
I am somehow saying people using Perl should *switch* to using Python.
But none of those is the case.
John Y.
As an Amazon Associate we earn from qualifying purchases.