Thread overview
STL and Phobos
Apr 11, 2015
Dennis Ritchie
Apr 11, 2015
w0rp
Apr 12, 2015
Dennis Ritchie
April 11, 2015
Will the STL included in Phobos or is it impossible?
April 11, 2015
On Saturday, 11 April 2015 at 17:01:42 UTC, Dennis Ritchie wrote:
> Will the STL included in Phobos or is it impossible?

STL won't be included in Phobos, at least as far as I know, but I believe it should be possible to interface to parts of it with extern(C++). To do it, you need to create names for every part of an STL type, including the allocator. Walter discussed all of this in a recent talk.

https://www.youtube.com/watch?v=IkwaV6k6BmM

It's really more for using existing C++ code which already uses the STL. In terms of algorithms, D is already in a better shape with std.algorithm. In terms of containers, you might find Phobos lacking for the moment, but progress will accelerate when Andrei's allocators are finally included in Phobos.
April 12, 2015
On Saturday, 11 April 2015 at 17:14:50 UTC, w0rp wrote:
> On Saturday, 11 April 2015 at 17:01:42 UTC, Dennis Ritchie wrote:
>> Will the STL included in Phobos or is it impossible?
>
> STL won't be included in Phobos, at least as far as I know, but I believe it should be possible to interface to parts of it with extern(C++). To do it, you need to create names for every part of an STL type, including the allocator. Walter discussed all of this in a recent talk.
>
> https://www.youtube.com/watch?v=IkwaV6k6BmM
>
> It's really more for using existing C++ code which already uses the STL. In terms of algorithms, D is already in a better shape with std.algorithm. In terms of containers, you might find Phobos lacking for the moment, but progress will accelerate when Andrei's allocators are finally included in Phobos.

Thanks.