how to build up the library..

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Oct 6 20:49:01 PDT 2011


On 10/6/11 8:55 PM, Nick Sabalausky wrote:
> "Andrei Alexandrescu"<SeeWebsiteForEmail at erdani.org>  wrote in message
> news:j6ljvs$1if5$1 at digitalmars.com...
>>
>> For D in particular, I think the range aspect is secondary. Probably it
>> will be more important to interoperate with Variant. Most APIs store
>> columns in a Variant structure that captures all possible types of the
>> database.
>>
>> Resultsets come as input ranges of array of Variant. It's not important to
>> make them compatible with the input range interface because it's unlikely
>> you'll pass that array of Variant directly to some algorithm. That being
>> said, people will naturally expect to use the canonical range interface.
>> It would probably be gratuitous to choose other primitive(s) than
>> empty/front/popFront.
>>
>
> Personally, I would *expect* a good DB API to provide statically-typed
> columns. I use D because I hate dynamic typing, not because it provides a
> Variant. Whether or not the DB API *also* has messy^H^H^H^H^HVariant
> capability for those who want it, I wouldn't care at all either way.

A statically-typed interface is nice when you know the schema a priori, 
but definitely there's a need for dynamically-created queries too.


Andrei


More information about the Digitalmars-d mailing list