• hydroptic@sopuli.xyzOP
      link
      fedilink
      arrow-up
      45
      ·
      3 months ago

      Use a dynamically typed language and you won’t have to: just override the default reverse() method on strings like a Real Programmer!

      Unintended consequences you say? Nonsense! What could possibly go wrong?

      • petey@aussie.zone
        link
        fedilink
        arrow-up
        27
        ·
        3 months ago

        I’m tempted to publish an NPM package to do so as a joke, but I fear that it’d get used seriously

        • RonSijm
          link
          fedilink
          arrow-up
          7
          ·
          3 months ago

          Where does it end though? It’s a bit like infinite craft - but instead of combining resources you’d have to find an inverse for every emoji

          • Feathercrown@lemmy.world
            link
            fedilink
            English
            arrow-up
            6
            ·
            edit-2
            3 months ago
            async function reverse(str){
                return ChatGPT.ask(`Please reverse the string ${str}. Reply only with the answer, without other words or symbols.`);
            }