dlang-community / d2sqlite3

A small wrapper around SQLite for the D programming language
Boost Software License 1.0
75 stars 26 forks source link

Remove dependency on Variant #76

Open schveiguy opened 11 months ago

schveiguy commented 11 months ago

The 5 types included in ColumnData are long, double, string, immutable(ubyte)[] and typeof(null).

There is no need to involve std.Variant for this. There's even a tag in the ColumnData type already!

Just a simple tagged union should suffice, there are no lifetime issues to deal with, all these are POD.

Geod24 commented 11 months ago

So switch to sumtype ? :)

schveiguy commented 11 months ago

Even sumtype is overkill IMO.

But the main reason I would want to switch is, std.variant is unsafe. It's why I switched away from it in mysql-native.