Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Why Perl in 2020

by shmem (Chancellor)
on Jan 05, 2021 at 13:09 UTC ( [id://11126367]=note: print w/replies, xml ) Need Help??


in reply to Re: Why Perl in 2020
in thread Why Perl in 2020

Perl is very much a write-only language for most programmers, and even many Perl programmers.

This argument always struck me as being plain silly. That's like saying that I write some text in German, and am later unable to read it because it is not English. Or that writing something now means misunderstanding myself in the future. Sure, every outside is a more or less gross misunderstanding of an inside, not only when it comes to e.g. giving account of one self, but that's not the point here.

If I talk with my Syrian or Turkish fellows, hearing their particular use of the german language, I can understand them and adapt to their peculiar, sometimes funny, constructs; and by talking likewise and applying sparse corrections I can gently lead them to a better understanding of the language.

Talking with speakers of the various german dialects, I can understand them (if not, I ask), but I wouldn't be able to express myself the same way without picking up not only their accent, but a plethora of other idiosyncrasities as well. And yet that's all german.

If the average coder has to mentally parse several sigils, matrix that with context, and then look deep into a subroutine to see what is done with a variable, it's not a good thing for the programmer. It can be done, and I'm sure those who live and breathe deep Perl on a daily basis can mentally parse things much faster. Most of us can't do that. We can parse things in our spoken language because we have lived in it for years. Yet we still miscommunicate and misunderstand. We spend hours trying to find some way to write a test for some undocumented subroutine that's a hundred lines long and heavily interdependent with other subroutines that make no more sense than this one.

Same goes for other languages without sigils: look deep into a subroutine to see what is done with it. But if I see a bare identifier in, say, C or python, I have to look up declaration and typedef: is it a char *, a dictionary, a function pointer, a struct? Sigils tell me clearly what type of variable this thingy is, and if it is a reference, the deref, its usage, tells me what's inside.

Complex things are complex, in any poorly written program in any language you can find yourself struggling with an undocumented subroutine that's a hundred lines long and heavily interdependent - that's not a perl feature. Yet perl is immensely more parseable than other languages whithout sigils - because of the sigils!

There are people which can read a page of C code at a glance and understand what happens - I can't for lack of training, but surely can do with perl code.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11126367]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found