proposal: OOP wrapper for ranges for easy interfacing

Timothee Cour thelastmammoth at gmail.com
Mon Mar 3 21:50:57 PST 2014


Ah, thanks I should've searched more, that's exactly what I wanted.


On Mon, Mar 3, 2014 at 9:02 PM, Brad Anderson <eco at gnuk.net> wrote:

> On Tuesday, 4 March 2014 at 04:59:12 UTC, Timothee Cour wrote:
>
>> Interfacing with ranges across libraries can be tricky due to heavy use of
>> templates. Example cases are when interfacing between D and C++ or when
>> using D shared libraries, that we would like to distribute with di
>> interface files.
>>
>> I'd like to have something like the following in phobos (see code below).
>> The code makes an OOP wrapper for ranges, allowing one to use separate
>> compilation model without having to pull in all the source code if we want
>> to use the library with arbitrary ranges of a given element type (see
>> unittest below). This could also greatly benefit compilation time since it
>> enables us to use thin di interface files.
>>
>>
> Have you seen InputRange and inputRangeObject in std.range?
>
> http://dlang.org/phobos/std_range.html#.InputRange
> http://dlang.org/phobos/std_range.html#inputRangeObject
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140303/8b657a36/attachment.html>


More information about the Digitalmars-d mailing list