Open Varriount opened 6 years ago
Sure, it could take a closure function, a closure iterator, a Stream
object, or something-something concepts (that would handle any iterator either string or stream). Problem is there isn't a buffered stream (or a unicode string stream for that matter) in the stdlib. I tried to implement something like this long ago [0], but it was crap. We need better IO primitives in the stdlib (similar to golang probably), otherwise the regex API would be really hard to use.
I guess I can always deprecate the new functions later when there's a better way (or I find one) :thinking:
There are times when one has a large (or possibly unlimited) amount of input. It would be nice to have match procedures that would accept a
moreDataProc
or similar parameter, to call when the internal logic needs more data from the string.