What's missing from Phobos for Orbit (package manager)

Steven Schveighoffer schveiguy at yahoo.com
Thu Feb 14 13:00:24 PST 2013


On Thu, 14 Feb 2013 14:57:25 -0500, Jacob Carlborg <doob at me.com> wrote:

> On 2013-02-14 15:28, Steven Schveighoffer wrote:
>
>> Would this work?
>>
>> bool any(R)(R r) if(isInputRange!R) { return !r.empty;}
>
> Yes, I already have something similar. Actually I have this:
>
> @property bool any (T) (T value) if (__traits(compiles, { bool a =  
> value.empty; }))
> {
>      return !value.empty;
> }

OK, here is what I suggest:

1. put all these "helper" trivial functions inside a module, call it  
orbithelper.
2. If phobos obtains these functions, remove them from orbithelper, and  
import the correct version.

The other things, such as xml, I think are more troublesome.  This seems  
like a trivial problem with a trivial solution.

-Steve


More information about the Digitalmars-d mailing list