this post was submitted on 10 Sep 2023
65 points (93.3% liked)

Technology

71448 readers
2660 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
 

hi, i was interested if perl is still relevant in this day and age. Perl has been on the decline for a very long time now. Perl 6 (now named 'raku) not being backwards compatible with perl 5 code made the already small perl community even smaller by splitting it in half. A good example is lisp with it's thousands of different dialects.

Is it still worth using or is it bound to legacy software forever? Like cobol.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 37 points 2 years ago* (last edited 2 years ago) (1 children)

For me, Python replaced Perl 15 years ago. I know Perl is a great language, but it's too "write-only." Python replaced both BASIC and Perl at the same time, even with the problems of migration from v2 to v3. Python can also do scripts to replace Bash and PowerShell. I don't see myself learning Perl now, it would be a waste of time.

Perl was revolutionary at the time with CGI and regexes, but it's not needed anymore.

[–] [email protected] 13 points 2 years ago (6 children)

I wish python was not indentation aware. It has discouraged me to learn it.

[–] [email protected] 24 points 2 years ago (3 children)

Even if you're writing JavaScript, you should be using proper indentation. What an odd thing to keep you from learning it.

[–] [email protected] 8 points 2 years ago

I write code, indentation is something that the editor just does automatically. If I want to change indent settings I just mark the complete buffer, press tab, and magic happens.

I've been using python for various stuff for a few years now as well, and the indent thing still annoys me.

[–] [email protected] 2 points 2 years ago

Things get messy though, when you have to break the rules of indentation once in a while or when you have “improper “ indentation. Whitespace is a stupidly messy thing. Indentation should be a style guide, not part of the language semantics.

[–] [email protected] 0 points 2 years ago* (last edited 2 years ago)

No, it really is horrible. I’m an old timer who learned on FORTRAN and other languages that were still suffering from the punchcard era. Making logic based on character positioning, and adding unnecessary restriction, is just so frustrating and tedious. We got away from such constraints by the 1990’s. Let’s not go back.

Sure enough, my kid’s Comp Sci teacher tried to use Python because he read how easy it is to use, but no one succeeded because of the formatting. No one succeeded except my kid, who also became a rock star by helping kids reformat. Anyhow, back when computers were primitive and limited, such restrictions were understandable. They’re not anymore.

Currently I’m a fan of Groovy. All the capability of Java without silly requirements like semi-colons. All the simplicity of Python without silly formatting restrictions

[–] [email protected] 21 points 2 years ago

If that's your only reason, I'd encourage to try it anyway. Logical indentation is initially weird but it can be overcome very fast.

[–] [email protected] 5 points 2 years ago (1 children)

It has never been an issue for me in 20 years. If you move code, you cut a whole paragraph, paste, and indent appropriately.

[–] [email protected] -3 points 2 years ago (1 children)

If I move code in non-python code, I cut a whole paragraph, paste, and I'm done if that's all I wanted to do.

[–] [email protected] -1 points 2 years ago (1 children)

Your code won't be indented properly, same problem as Python unless you have a formatting tool in your setup.

[–] [email protected] 1 points 2 years ago* (last edited 2 years ago) (1 children)

It won't matter. It will still compile correctly every time, as opposed to python, and that's my point. Choice. Choice is the key here.

[–] [email protected] 1 points 2 years ago (1 children)

Python isn't (generally) compiled. Have you used python before?

[–] [email protected] 1 points 2 years ago

I know Python is interpreted, but regardless, my point still stands. Just replace compile with run correctly.

[–] [email protected] 4 points 2 years ago (1 children)

I wish python was not indentation aware. It has discouraged me from learning it.

lol, then you just don't like Python. You can't disassociate the two things.

[–] [email protected] 7 points 2 years ago (1 children)

Yup, I don't like it because of it.

[–] [email protected] 1 points 2 years ago (1 children)

You flat out haven't used it.

[–] [email protected] 1 points 2 years ago* (last edited 2 years ago)

Correct. I don't think we're disagreeing. The language has one deal-breaker to me and that's all I need to know.

That's like saying "you won't be friends with Bob because he's likes to go to smoking-friendly places all the time and you don't? BUT YOU DON'T KNOW THE GUY!!!!!"

[–] [email protected] 4 points 2 years ago (1 children)
[–] [email protected] -3 points 2 years ago

Nope. It isn't.

[–] [email protected] 2 points 2 years ago (1 children)

I wish python was not indentation aware

You don't like your good ol' COBOL??

:-)

[–] [email protected] 1 points 2 years ago (2 children)
[–] [email protected] 4 points 2 years ago (1 children)
[–] [email protected] 1 points 2 years ago

Today I learned. Thanks!

[–] [email protected] 2 points 2 years ago

It’s punch card-column aware, if you're talking about that.