On Thursday, 1 October 2015 at 07:37:28 UTC, deadalnix wrote:
Well, yes and no. Sure I'm sure there are precedent for ranges, be it in C++ or even I'm sure one can find them in other languages. I'm sure someone in the 70s had something like ranges already.

Yes, certainly in the 70s, but I would be surprised if something like it was not done for Lisp in the 60s? What D/C++ call ranges is iterators/generators. C++ mislabeled "table-pointers" as "iterators", which is a source for endless confusion. Co-routines, like the ones in Simula which was "stackless", can be viewed as a heavy async version of iterators/generators too. Adapters can be hooked up at runtime also (if speed is not a priority).

So, "ranges" are very common, with varying syntax/performance.

Reply via email to