‹ BackHN Continuity

Thread

My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

341 points · 107 comments · jakeasmith

  1. jakeasmith · · focus · HN ↗
    Author here, happy to answer any questions. I never imagined a polyfill for http_build_url would gain so much traction. After 12 years, deprecating it feels like the right move, especially given the new options from the community and PHP itself.
    1. HackerThemAll · · focus · HN ↗
      The JavaScript world is littered with stuff comparing to which your patch seems like a complex project. See those examples:

      <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-odd" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-odd

      <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-even" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-even

      <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;left-pad" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;left-pad

      <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-whitespace-character" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-whitespace-character

      <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;isarray" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;isarray

      1. domh · · focus · HN ↗
        These packages are basically memes at this point... Those download figures cannot be accurate for real production usage.

        I don&#x27;t believe any programmer is actually using these. isarray and left-pad are at least functions that didn&#x27;t used to be in the standard library, to slightly excuse them.

        1. baubino · · focus · HN ↗
          Actual programmers do indeed use these packages, and in large numbers. I was in the unfortunate situation a few years ago of hiring a couple of interns (both juniors in a decent CS program) who relied heavily on these types of packages. They honestly thought that it saved them time and they didn’t seem to comprehend the bloat they were adding to otherwise simple code that they could’ve written themselves in 30 seconds. NPM trained a generation of programmers to look for packages rather than learning basic scripts.
          1. domh · · focus · HN ↗
            It feels like (to me at least) that the pendulum is swinging back the other way. But maybe this is just my preference.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.