News for hackers. Stuff that matters.
Re:Left-Pad (2024) by eviks on Wednesday June 11, 2025 @10:15AM (#44247871)
What about the time it cost you to search the internet, read the docs, and use the one from std? How many seconds does each variant take (with hot/cold memory cache?)

And the behavior could also be worse, there is no guarantee of perfection.

The last argument is too generic to offer any guidance. Why is it better for this function be duplicated?? Should it not be part of std to avoid uniqueness?

Re:Left-Pad (2024) by Izkata on Wednesday June 11, 2025 @06:25PM (#44252484)
> Should it not be part of std to avoid uniqueness?

> > > > (assuming the standard library doesn't include one already)

Re:Left-Pad (2024) by eviks on Wednesday June 11, 2025 @10:11PM (#44253699)
This doesn't address the should