Combine Coroutines and Input Ranges for Dead-Simple D Iteration

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Wed May 2 03:35:52 PDT 2012


"Nick Sabalausky" <SeeWebsiteToContactMe at semitwist.com> wrote in message 
news:jnr241$nh1$1 at digitalmars.com...
> "SomeDude" <lovelydear at mailmetrash.com> wrote in message 
> news:ypakkndfsibcbgeljvgu at forum.dlang.org...
>> On Tuesday, 1 May 2012 at 08:26:45 UTC, Nick Sabalausky wrote:
>>> A little write-up I just did on something I thought was pretty cool:
>>>
>>> Combine Coroutines and Input Ranges for Dead-Simple D Iteration
>>> https://www.semitwist.com/articles/article/view/combine-coroutines-and-input-ranges-for-dead-simple-d-iteration
>>
>> Call me stupid, but I've absolutely no idea what you're doing. What 
>> problem does the InputVisitor solve ? What are the current solutions ? 
>> What is the intent of your code ? What are the supposed advantages ? Your 
>> article says nothing about it.
>
> Just an easier-to-read/write alternative to an opApply or an input range. 
> More natural and straightforward than a hand-written input range, and 
> cleaner syntax than opApply (and without opApply's downside of not being 
> usable as a range).
>

Of course, based on the timing results Jerro and Rory reported, Adam's mixin 
helper for opApply probably hits a better balance of performance vs 
usability.




More information about the Digitalmars-d-announce mailing list