Streaming parsers in D a novel design
Sebastiaan Koppe
mail at skoppe.eu
Tue Apr 18 14:26:00 UTC 2023
On Tuesday, 18 April 2023 at 08:13:05 UTC, Dmitry Olshansky wrote:
> A streaming parser is doing 2 things:
> - waiting for input
> - processing the current input and spitting out Events
>
> This maps to D beautifully:
>
> 1. Waiting for input means it's an OutputRange with explicit
> put method!
>
> 2. Processing events means it's an InputRange of events. It may
> even be ForwardRange, mine first of this kind is Forward range.
>
> Destroy!
>
> --
> Olshansky Dmitry
I think it will work beautifully until the day you want to do it
asynchronously.
More information about the Digitalmars-d
mailing list