[sf-perl] Stack Overflow Blog: "Why Perl is still relevant in 2022"

Sean Dodger Cannon el.dodgero at gmail.com
Sat Jul 9 00:54:45 PDT 2022

On Friday, 8 July 2022, Shlomi Fish <shlomif at shlomifish.org> wrote:

> Hi Mr. Dodger!

Hi Ms. or Mr. Schlomi!

Moose and Moo are not that bad, IMO, do not have a prohibitive overhead, and
> make writing Perl OOP code easier and cleaner:
> https://perl-begin.org/topics/object-oriented/

Uh, Ms. or Mr. Fish: I *know about them*. Nothing in my message indicated I
was in any way unfamiliar with them.

But in my opinion, they *don’t* make writing perl OO code easier and
cleaner. They make writing perl OO code stupider and arbitrarily restrict
it. And my Perl *was clean in the first place* because I’m anal about
keeping it readable. I don’t golf.

Isn’t it at all conceivable to you (or anyone else drinking the moose
“modern perl” flavor-aid) that there are people out here who know perfectly
well what it is and just *don’t like it*?

Not liking it doesn’t mean we don’t understand it or don’t know what it is.

It just means we aren’t buying in to all this Moo* crap.

OOP predates java and Moose is very different from java's OOP:

It was an obvious figure of speech. I was making fun of (^Moo(se)?). Again,
I don’t need a condescending link to tell me what I already know about
something I already assessed and decided is useless, wasteful crap.

I don’t like it, I’m not going to like it, I don’t use it, I’m not going to
use it, and I’m very unhappy that you moose lodge zealots have convinced
all the pointy-haired managers that those of us who roll our eyes at that
rubbish are somehow less talented or capable because it makes it harder to
get jobs when a random shibboleth has been added for no reason. It was a
dick move on y’all’s part.

Quite honestly, I think that if you or anyone actually NEEDS Moo/Moose to
“make writing Perl OOP code easier and cleaner”, that if you actually
thought Perl OO programming was *at all* hard and somehow needed that
simplified for you, and that if you can’t write clean, readable,
self-documenting code without a moose holding your hand, then maybe it’s
not *me* who should be looked down on as the inferior programmer. Y’know?

> Honestly, while I still love and use Perl 5, I also like Python 3 a lot:
> * https://www.shlomifish.org/meta/FAQ/thought_you_were_a_Perl_guy.xhtml
> Python is very easy to learn, and some people were able to tweak py code
> just
> by opening an existing codebase in a text editor.

>From what I’ve seen, yes, python is very easy to learn for people who
*don’t already know how to program*.

It is *not* one of the easier languages to transition to for a developer
already fluent in any pascal-descendant language. It honestly comes off
like someone described the idea of a programming language to someone who
had never used one but was clever enough to come up with one from the
description. Kudos to that, sure, but trying to learn it when fluent in a
curly-brace language is like trying to learn Japanese when fluent in a
Romance language.

Is Japanese sensible? Sure. Is it strict? Absolutely. Is it efficient?
Totally. Is it precise? Way more than English for sure. Is it anything like
a Romance language? Not by leagues and fathoms.

A perl programmer can pick up java, javascript, C, C++, C#, Objective C,
and numerous other languages descended from pascal easily.

But to jump from this paradigm to something completely weird like Python is
actually harder than just learning Python in the first place from scratch.

Just for instance, the thing that we call a “string literal” is, in Python,
referred to as a “constant”. In Perl and other C/Pascal related languages,
if constants exist at all the term means an immutable variable. A variable
that can only by changed by re-assigning it (effectively overloading it).
It cannot be changed “in place”.

Python doesn’t see this as anything special because that’s *all variables*.
*Every* variable in Python is what Perl thinks of as a constant. Nothing
can be changed in place and the assignment operator is the only way to
alter that which is inside a variable (though at least you can go inside
the assorted structs, you’re still using assignment).

So, in effect, they differ down to the level of actually disagreeing on
what the definitions of the words “constant” and “variable” are. I don’t
know if you can get more fundamentally different than that.

Another factor is that there aren’t really tutorials or classes for python
that aren’t remedial for an advanced programmer of anything else. Throw in
that “we can’t even agree what constant means” problem and you have a
perfect storm recipe for disaster in trying to transition.

A newbie will actually benefit from chapter upon chapter in O’Reilly’s
Learning Python on “what is a variable” and “what can you do with a
variable” and “what is a function” and so on. I’ve thumbed my way through
that book and gotten halfway in before anything seemed actually
instructional to an experienced programmer.

So the solution should be “ok skip it, go to the meat”—except the constant
problem. I mean that “constant” problem. Just when you think things make
sense, it’s all “uhh WTF?” and you realise there’s some basic core concept
that’s just treated totally differently in Python but the details about
that are buried in the prior 300 pages you just skipped and you don’t know

So what do you do? BS? Fake it ‘til you make it and slog through? Or go
back and read a decent sized novel’s worth of tedious, boring, almost
insultingly remedial crap just to try to get at the one bigger buried in
there you need?

It would be like learning Icelandic and then realising you don’t know what
“þ” means but having to dig through 200-300 pages on the alphabet you
already know because you don’t know where that would go in the alphabet and
it’s not in an alphabetical order you recognise anyway. You want to learn a
language but you’re stuck because you don’t know 1 or 1 of the ABCs, even
though you know the rest. Quite a þ in the side, truly.

Anyway, literally anyone who isn’t special needs can tweak python *or any
other code at a higher level than assembly* just by opening an existing
source code file in an editor, even if most people are afraid to do so. So
of course that’s true.

That said, I already admitted I need to try to make myself fluent in the
ophidian language. Because as much as it pisses me off, there is one thing
Python can provide that Perl really just can’t anymore (especially me that
people who need baby talk Moose garbage hand-holding have convinced
everyone that people who *don’t* aren’t as good somehow):

An income


S. Cannon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20220709/07ceeccb/attachment-0001.html>

More information about the SanFrancisco-pm mailing list