RFC: mysql-native - Supporting both Vibe.d and Phobos sockets

Jacob Carlborg doob at me.com
Mon May 13 00:03:08 PDT 2013


On 2013-05-12 23:16, Nick Sabalausky wrote:

> I *could* push that to the main mysql-native master repo right now
> <https://github.com/rejectedsoftware/mysql-native>. But I'm hesitant
> for one reason:
>
> Since Phobos's and Vibe.d's sockets have incompatible APIs, my design
> converts most of the types in mysql-native into templates. For example,
> 'Connection' becomes either 'Connection!mySQLSocketVibeD' or
> 'Connection!mySQLSocketPhobos'. The type 'Command' becomes either
> 'Command!mySQLSocketVibeD' or 'Connection!mySQLSocketPhobos'. And the
> same goes for most other types, such as Row, ResultSet, etc.
>
> That is the only breaking change, but depending how your code uses
> mysql-native, it can be a very significant breaking change.

Why don't you just relay on a version flag? Is it really necessary to 
change this at runtime?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list