Thread (160 messages) 160 messages, 20 authors, 2023-05-08

Re: [PATCH 01/40] lib/string_helpers: Drop space in string_get_size's output

From: Kent Overstreet <kent.overstreet@linux.dev>
Date: 2023-05-03 02:07:51
Also in: cgroups, linux-arch, linux-doc, linux-fsdevel, linux-iommu, linux-mm, lkml

On Tue, May 02, 2023 at 06:19:27PM +0300, Andy Shevchenko wrote:
On Tue, May 2, 2023 at 9:22 AM Kent Overstreet
[off-list ref] wrote:
quoted
On Tue, May 02, 2023 at 08:33:57AM +0300, Andy Shevchenko wrote:
quoted
Actually instead of producing zillions of variants, do a %p extension
to the printf() and that's it. We have, for example, %pt with T and
with space to follow users that want one or the other variant. Same
can be done with string_get_size().
God no.
Any elaboration what's wrong with that?
I'm really not a fan of %p extensions in general (they are what people
reach for because we can't standardize on a common string output API),
but when we'd be passing it bare integers the lack of type safety would
be a particularly big footgun.
God no for zillion APIs for almost the same. Today you want space,
tomorrow some other (special) delimiter.
No, I just want to delete the space and output numbers the same way
everyone else does. And if we are stuck with two string_get_size()
functions, %p extensions in no way improve the situation.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help