phobos

D standard library

I've decided to learn D, and I'm wondering which standard library I should use. Should I use Phobos or Tango? What are the pros and cons of each? ...

What is the current status of D standard libraries?

There are two of them Phobos and Tango. As far as I know they are redundant and incompatible. Are there any plans to join them? If so, when will it happen? ...

Checking in D if a string is in array?

How do I check for a string occurance in an array? I mean sure I can loop, but is there a standard function? at first I did: if(str in ["first", "second", "third"]) but it complained that in only works with associative arrays. I tried to quickly lookup the phobos docs but didn't find any module related to arrays. So is there anythi...

D/Phobos Style guide

I've just begun looking at the phobos source, and it's littered with several different styles and commented out code. The style guide on the web side is very small, and I only found broken links from 2006 and another one from 2004... Is there a newer, more comprehensive guide available? PS: Originally asked at the D.learn newsgroup, ...

Why does Phobos use enum for constants?

Why does Phobos use enum to define constants? For example, in std.math: enum real E = 2.7182818284590452354L; Why not use a global immutable? What are the advantages/disadvantages of enum over immutable? ...

Using std.algorithm.map with member functions in D2.

I have: Foo foo = new Foo(); foreach (i; 0..10) { Bar bar = foo.getBar(i); ... } I want to be able to instead say (equivalently): foreach (bar; foo.getAllBars()) { ... } How do I go about implementing getAllBars()? I figured something like this: class Foo { auto getAllBars() { return map!(getBar)(iota(10)); } } ...

Stack-based object instantiation in D

I'm learning D, and am confused by an error I'm getting. Consider the following: module helloworld; import std.stdio; import std.perf; ptrdiff_t main( string[] args ) { auto t = new PerformanceCounter; //From managed heap //PerformanceCounter t; //On the stack t.start(); writeln( "Hello, ", size_t....