[phobos] Ranges using runtime interfaces

David Simcha dsimcha at gmail.com
Thu Aug 19 20:42:44 PDT 2010


I remember about a year and a half ago, there was talk of defining a 
wrapper module around ranges to make them more usable in cases where 
templates can't be used, such as virtual functions.  I've revisited that 
now that I'm cleaning up ranges.  I've created a fairly simple attempt 
at writing such a module.  (http://pastebin.com/aDew6Kgg)  This exercise 
has reinforced my conviction that about the only thing good about 
nominative typing is that it's easy to implement efficiently.

I decided to exclude ref access to elements and infiniteness propagation 
from the interface entirely because I couldn't see a good way to 
implement these.  I did, however, include assignable elements.  Please 
review this module and tell me whether it looks worth including in 
Phobos and if so, where.  Also, any suggestions on better naming would 
be greatly appreciated.


More information about the phobos mailing list