Hacker News new | ask | show | jobs
by asocial 4183 days ago
That's not a problem, that's a feature.

Competition between frameworks and libraries ensures that there are multiple solutions to meet multiple needs, and also that consensus, where it exists, exists due to the popularity of a package, not the dictate of someone setting an arbitrary "standard" for the community. You can guarantee that Laravel is going to be updated because people use it and contribute to it, not because it's the only option.

And there's no guarantee that a single solution is going to keep backwards-compatibility. That is always entirely at the whim of the developer. Removing room to innovate only guarantees stagnation, it doesn't guarantee the standard.

1 comments

https://packagist.org/search/?q=http%20router

92 pages of the same basic router implementation. That is a problem. A huge problem.

No it isn't, it's the way open source is supposed to work. There being 92 pages of routers doesn't stop anyone from picking the most popular and well-maintained one. Almost anyone who actually cares is going to pick one of the large frameworks (which probably use Symfony) or use nikic's FastRoute. If you're worried about small packages being maintained into the future, that's what forking is for. If you want to write your own, you can.

Also, to be fair to your argument, Composer will load packages from outside Packagist, and VCS systems other than git, so the actual universe of available routers is probably much, much bigger. I'd suggest this as another example of how not conforming to a standard (Packagist as the de facto PHP repository) is a benefit. You don't even have to care about Packagist and Composer still works just fine.

That's not really a problem.

Composer makes dependencies flat , and PHP isn't module based,but namespace and class based.

Which makes libraries way more stable,unlike the nodejs galaxy of packages for instance.

And by the way,most of the packages listed aren't routers.

If you only search the word "router",you'll get only 21 pages,roughly 300 packages.

now go on npm.org and type in router you'll get more than 1600 packages.

Where do you think the problem is ? is nodejs a module based language with dependency trees , or PHP , class and namespace based language with flat dependencies?

nikic/FastRoute. You're welcome.

(Also, note that the problem is more with Packagist's search results, since most of them aren't even routing libraries)