Working functionally with third party libraries

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 18 02:18:12 PDT 2015


On Saturday, 18 July 2015 at 08:03:56 UTC, Jarl André Hübenthal 
wrote:
> Its simple. In most cases you do an advanced aggregated search 
> in mongo, and what you get is then a mongocursor. Lets say I am 
> retrieving all projects for a given customer where the project 
> is started.. I really am in no interest of lazily evaluating 
> this result, because I want to return this data to the client 
> (browser) immediately.

How big is the slowdown you notice for lazy processing? Lazy 
processing is believed to be faster because it's less resource 
consuming.

> And lets say I am in a prototype phase where i haven't yet 
> implemented all those nasty mongo queries, I want to be able to 
> filter, map and reduce the result and work with arrays not some 
> sort of non evaluated lazy MapResult.

I believe those algorithms were written to work on lazy ranges. 
What makes you think they can't do that?


More information about the Digitalmars-d-learn mailing list