A Philosophy of Software Design

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Mon May 25 14:47:17 UTC 2026


On 26/05/2026 2:39 AM, H. S. Teoh wrote:
> On Tue, May 26, 2026 at 02:34:28AM +1200, Richard (Rikki) Andrew Cattermole via Digitalmars-d wrote:
>> On 26/05/2026 2:29 AM, H. S. Teoh wrote:
> [...]
>>> The current implementation of writefln leaves a lot of room for
>>> improvement.  A single call with a simple "%s" format pulls in the
>>> machinery for a truckload of specialized formatting code, like
>>> floating-point formatting (which like all things IEEE is exceedingly
>>> complex), BigInt handling, ad nauseum.
>>>
>>> Retrospect is always 20/20, as they say, but what *should* have been
>>> done is that the format string should be a compile-time argument that's
>>> scanned at compile-time by CTFE, and transformed into a series of
>>> straightforward calls for each argument.  For example, writing:
> [...]
>> There is a simple way to archive this, use IES.
> 
> What's IES?
> 
> 
> T
> 

https://dlang.org/spec/istring.html



More information about the Digitalmars-d mailing list