PhobosV3+ Fundamental Elements

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Sep 8 16:48:48 UTC 2026


On 09/09/2026 4:18 AM, monkyyy wrote:
> On Tuesday, 8 September 2026 at 07:32:05 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>> On 08/09/2026 11:30 AM, Walter Bright wrote:
>>> On 9/2/2026 6:17 AM, Max Klyga wrote:
>>>> The correct way is to have a generic sink, not a string builder. And 
>>>> especially not a specific string builder class implementation!
>>>
>>> I've been slowly moving the dmd implementation towards sinks. Sinks 
>>> can be generic even without templates.
>>
>> Note that what Walter said here has nothing to do with delegates.
>>
>> The sink is a class, ErrorSink.
>>
>> It uses varadics and printf style formatting.
>>
>> Which is a more closely tied to the string builder than the delegates 
>> being suggested here.
> 
> surely walter knows the community wont accept printf... right?
> And typeinfo doesnt have enough info to introspect structs is the plan 
> to change that, surely you need to print nested things?

That is what dmd uses.

Whereas with the string builder we can have a templated opOpAssign and 
use IES (if it supported formats) to do it.

Templates are ok with this, and can be minimized over what std.format does.



More information about the Digitalmars-d mailing list