Petr, I played with your library a bit. Its has some interesting and creative pieces and uses some cool tech (love Roslyn). Might need a bit of love and polishing, as I think the syntax is too verbose, but that's irrelevant here.
Well, I can't tell you any use cases from my library users, because
there aren't any
(like I said, I didn't actually publicize it yet).
And my library would solve most of those cases the way I explained before:
IEnumerable inside IEnumerable (the exact shape depends on the user).
In the case of more than one prop being used,
it always continues all props, even if the user iterates only one of them.
Petr Onderka
[[en:User:Svick]]
On Tue, Dec 18, 2012 at 9:00 PM, Yuri Astrakhan <yuriastrakhan@gmail.com> wrote:
> Petr, thanks, I will look closely at your library and post my thoughts.
>
> Could you take look at
> http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Recipes and see how your
> library would solve these? Also, if you can think of other common use cases
> from your library users (not your library internals, as it is just an
> intermediary), please post them too. I posted cases I saw in interwiki &
> casechecker bots.
>
> Thanks!
>
>
> On Tue, Dec 18, 2012 at 2:25 PM, Petr Onderka <gsvick@gmail.com> wrote:
>>
>> On Tue, Dec 18, 2012 at 5:39 PM, Yuri Astrakhan <yuriastrakhan@gmail.com>
>> wrote:
>> > Same goes for iterating through a collection - none of the programming
>> > languages offering IEnumerable have stream control functionality - too
>> > complicated without clear benefits.
>>
>> Actually in my C# library [1] (I plan to publicize it more later)
>> a query like generator=allpages&prop=links might result in something
>> like IEnumerable<IEnumerable<Link>> [2].
>> And iterating the outer IEnumerable corresponds to iterating gapcontinue,
>> while iterating the inner IEnumerable corresponds to plcontinue
>> (of course it's not that simple, since I'm not using limit=1, but I
>> hope you get the idea).
>>
>> And while this means some more work for the library writer (in this case,
>> me)
>> than your alternative, it also means the user has more control over
>> what exactly is retrieved.
>>
>> Petr Onderka
>> [[en:User:Svick]]
>>
>> [1] https://github.com/svick/LINQ-to-Wiki/
>> [2] Or, more realistically, IEnumerable<Tuple<Page, IEnumerable<Link>>>,
>> but I didn't want to complicate it with even more generics.
>>
>> _______________________________________________
>> Mediawiki-api mailing list
>> Mediawiki-api@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
>
> _______________________________________________
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api