++Phobos

jmh530 john.michael.hall at gmail.com
Fri Oct 18 17:09:55 UTC 2019


On Friday, 18 October 2019 at 16:14:26 UTC, Meta wrote:
> [snip]
>
> I wrote that in response to Rikki's assertion:
> "This unfortunately still ties the implementation itself to the 
> interface. Which goes against DbI."
>
> Just some spitballing on how DbI could harmoniously co-exist 
> with Atila's concepts library.

I'm never quite sure whether I grok DbI or not...but all those 
static if's in phobos's MapResult are introspection to make sure 
that the range type has the appropriate functions and include the 
relevant text in MapResult. So it seems to me that isInputRange 
in phobos is DbI-compatible, particularly when re-reading what 
Rikki wrote. He seems to be arguing that what you are doing is 
not DbI because you are using interfaces instead. I think he 
would be making that complaint about any use of interfaces. 
However, the concepts library has more than just implements. Its 
alternative isInputRange could replace phobos's isInputRange or 
alternately be used used with the models template as needed. In 
my limited DbI understanding, that would be closer to DbI than 
what you are trying to do.


More information about the Digitalmars-d mailing list