How to return range constructs?

Robin robbepop at web.de
Fri Feb 28 11:02:22 PST 2014


Hiho,

ok thanks - I haven't known that interfaces are not a "must 
extend" like in java to serve as a real interface to something. 
This is strange to me in first place but has its pros.

And when I want to build up a RandomAccessFinite I just have to 
implement the other methods as well, okay. :D
Is this performance intense to iterate over these custom ranges 
instead of iterating plainly without them or is the compiler 
optimizing the overhead away?

I have got another problem with my current implementation. My 
data field is private (as you can see from my first post) and I 
don't really want to create a public getter for it (because of 
the encapsulation) but I either don't want to copy it everytime I 
create a range for my matrix. On top of all I want to have 
seperate source files instead of one huge file (one module) where 
I can access everything (which is what I would need atm). So is 
there another way to solve this problem? Or do I really have to 
merge all my files into one big giantic file so that they are all 
in the same module?

Robin


More information about the Digitalmars-d-learn mailing list