Streaming parsers in D a novel design

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Apr 19 19:50:35 UTC 2023


On Wednesday, 19 April 2023 at 19:13:25 UTC, Sebastiaan Koppe 
wrote:
> On Wednesday, 19 April 2023 at 16:07:18 UTC, Jacob Shtokolov 
> wrote:
>> On Tuesday, 18 April 2023 at 14:26:00 UTC, Sebastiaan Koppe 
>> wrote:
>>> I think it will work beautifully until the day you want to do 
>>> it asynchronously.
>>
>> Ranges can be async, in this case, you just need to return the 
>> Result type (pending|error|success) and provide hints to 
>> something that will be pulling from this range.
>
> Maybe. But not without major hurdles. And you forgot (async) 
> cancellation, which is a big deal, ask Rust.

Cancelation is trivial, you can break a fiber at any safe point 
(where it yields)

--
Dmitry Olshansky


More information about the Digitalmars-d mailing list