Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^5: sort AoH buggy? (deprecation candidate)

by hippo (Bishop)
on Dec 10, 2021 at 15:43 UTC ( #11139554=note: print w/replies, xml ) Need Help??

in reply to Re^4: sort AoH buggy? (deprecation candidate)
in thread sort AoH buggy?

It's causing more damage than benefit

IYHO, of course. Personally speaking I see it as neither a huge boon nor a terrible disaster.

and fixing old code is easy

It really isn't. Technical debt is a huge problem within the industry - just ask any COBOL programmer (if they will let you onto their superyacht). I have seen comments like

# This next line is essential for this subroutine to work but I don't +know why. # DO NOT TOUCH OR REMOVE IT!

too many times to be shocked or surprised. Any time you touch old code you risk breakage and the older the code the higher the risk.

The more logical Perl is constructed, the easier it is to promote.

Completely agree (so long as it doesn't end up just being a dialect of python ;-p)


Replies are listed 'Best First'.
Re^6: sort AoH buggy? (deprecation candidate)
by LanX (Sage) on Dec 10, 2021 at 19:05 UTC
    NB: I said deprecation candidate

    I doubt it's complicated to transform

    • sort my_comp LIST
    • sort {my_comp} LIST
    but YMMV.

    In the end this would boil down to using pragmas to keep old code afloat. And consequently to a similar discussion like use v7; was.

    Problem is that the community has no agreement about the goals and their target groups.

    I'd say they can't even communicate about that, at least in a productive way.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      I doubt it's complicated to transform ...

      Not at all in one line of a 20-line script. But to do it reliably across many files in a 1,000,000 line codebase without breaking anything? That's a different matter entirely. Never mind the shops who are running 15-year-old Perl systems with no Perl maintainer on the books.

      a similar discussion like use v7; was.

      Quite so. I applaud the enthusiasm of those who proposed it but to do so in a language which has always striven for backwards compatibility was inevitably going to be a big task. For every agile developer crying, "Throw it all out!" there is a sysadm or project manager with a legacy burden screaming "Keep it all in!".


        I think it's more complicated and the real problem is communication.

        Anyway pragmas are the solution for most of this, and we already did this with strict which changed the language considerably.

        Create something like a symlink perl7 pointing to perl and whenever the executable is run under the new name it'll activate use v7; automatically.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2022-05-25 04:39 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (84 votes). Check out past polls.