Not sure if that’s true. First of all, for it to be a problem you have to get swamped in different ways of achieving the same thing.

Sorry, but Javascript is the posterboy for this problem. Just look at the example given. Repeat string has a dozen different offerings. It’s a mundane operation. I know no other language in which there are modules for something like this, let alone so many.

It’s not necessarily hard to write reusable code, but in order for it to be reused it has to be available for reuse at the time it’s needed.

Take PHP, it has exactly 2 modules for connecting to Redis. One is a pure implementation, the other is a language extension. I know no libraries still in use that rehash functions offered by the platform.

It’s not that it doesn’t happen (internationalization is one messy thing, between currencies and stuff) but not to the extent that it has people going “wtf” on a large scale (plenty of occasional wtfs though)