Generators aren't for you, then, they are for people like me who, for example, used a C# generator for yielding tokens, or, for example, use generators to iterate element by element through multi-dimensional arrays.
--
Sent from Samsung Mobile
Andrew Faulds
http://ajf.me/
Lester Caine lester@lsces.co.uk wrote:
Sherif Ramadan wrote:
I don't see anything about these particular features that isn't
already documented. Albeit there are parts of the documentation that
could always use a bit of refinement every now and then. With that
said, the manual isn't a place to tell people "how" a particular
feature should be used, but how it "can" be used and to what
consequence. The actual use is left up to the developer and we all
know there is more than one way any given developer likes to implement
things in any language.
My only 'complaint' is that while there is a lot of 'documentation' it is all
somewhat fragmented. There is nothing which provides a 'good practice' guide,
and all of the examples returned by google searches nowadays are well behind the
times. Everything is well documented in it's own little niche, but nothing
provides a guide to link the whole into a coherent 'strict compliant' practice?
Generators are scratching another itch, from a base that I never started from.
My CSV scanners have always read in and processed blocks of data. The
fundamental mistake in the rfc is 'getLinesFromFile' not processing each line as
it is loaded. I do a LOT of database data processing which 'generate' results
sets, and the example of 'rewinding a generator' is much better handled by a
function that handles the cursor position on the data set. So I'm still not
seeing anywhere that 'generator' has a pressing application? Perhaps because I
already have library code that scratches the particular itch?
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
Andrew Faulds wrote:
Generators aren't for you, then, they are for people like me who, for example,
used a C# generator for yielding tokens, or, for example, use generators to
iterate element by element through multi-dimensional arrays.
Such as the family tree created by iterating through a GEDCOM file?
We build a searchable copy of the data in a database and use SQL tools for
interrogating the results.
And build result set arrays direct from the database. So perhaps I just don't
have any use for the concept with my methods of working ...
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
2012/7/25 Andrew Faulds ajf@ajf.me:
Generators aren't for you, then, they are for people like me who, for example, used a C# generator for yielding tokens, or, for example, use generators to iterate element by element through multi-dimensional arrays.
Then make it in the PHP way not in the C#-way.
--
Alex Aulbach