Re:Query Engines: Push vs. Pull
by nathanaldensr on Saturday May 01, 2021 @01:09PM
(#27007873)
I don't think that is correct. Underlying much of LINQ is IEnumerable<T>, which implements the classic Current and MoveNext() iterator pattern. The foreach keyword uses IEnumerable<T> to "pull" elements one at a time.
LINQ's syntax is just syntactic sugar on top of chained method calls to various interface extension methods.
Re:Query Engines: Push vs. Pull
by barrkel on Saturday May 01, 2021 @09:27PM
(#27011569)
Also IQueryable, and also the choice of ASTs vs closures, and also lazily evaluated, which means a different plan with a different strategy may intercede
Re:Query Engines: Push vs. Pull
by rzzzt on Saturday May 01, 2021 @01:40PM
(#27008170)
Ahh, you are right. My eyes somehow drifted away from the _pull_ example with yield above the "basic push-based query engine" header, that is the one which I've found familiar.
LINQ's syntax is just syntactic sugar on top of chained method calls to various interface extension methods.