Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: C23 thoughts and opinions
Date: Fri, 24 May 2024 06:54:35 -0700
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <86y17zgvs4.fsf@linuxsc.com>
References: <20240523150226.00007e7d@yahoo.com> <86msoghwoc.fsf@linuxsc.com> <20240524120544.00000a7d@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Fri, 24 May 2024 15:54:37 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="4e2ccf3374e48a9f13e87ba250cb95a8";
logging-data="2483956"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/opQ+633V3KDEXpdJM6ooSRZbWHJ55HI8="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:TbFgKNJUsZKS9PTfFvMdYacaHBs=
sha1:8j7l+WDptdLyCGV5JWvOtZGL/cg=
Bytes: 2422
Michael S writes:
> On Thu, 23 May 2024 17:37:39 -0700
> Tim Rentsch wrote:
>
>> Michael S writes:
>>
>>> [...] Just want to say that strfrom* family is long overdue, but
>>> still appear incomplete. The guiding principle should be that all
>>> format specifiers available in printf() with sole exception of %s
>>> should be provided as strfrom* as well.
>>
>> What's the motivation for having separate functions? To me this
>> looks like creeping featuritis.
>
> My practical motivation is space-constrained environments, where I
> possibly want one or two or three formatters. sprintf() gives me all
> or nothing and all can be too expensive. Many embedded environments
> have big and small variants of sprintf that can be chosen at link
> time, but what's in small variant does not necessarily match a set
> that I want in my specific project. And is not necessarily well
> documented.
Okay, I see now where you're coming from, although I'm not sure that
the strfrom*() functions will give you what you want (in terms of
memory footprint, etc). But I get your motivation.
Question: which of the four formats (%A, %E, %F, %G) are ones you
expect to use? Also I'm curious: do all of your target platforms
use IEEE floating point, or do some use other representations?