[Development] QVairant::Type enums are now obsolete?

Thiago Macieira thiago.macieira at intel.com
Tue Aug 21 10:42:40 CEST 2012


On terça-feira, 21 de agosto de 2012 10.21.12, Harald Fernengel wrote:
> Note that the concept of "NULL" values, while generally a bad idea, is a 
> concept required for the SQL module. SQL has the conecpt of "NULL" as an
> extra  flag for every value (date, int, string, etc. etc.).
> 
> That's why we added the is_null bitfield as extra flag on every QVariant,
> and  allowed people to construct QVariants that had a valid type but not a
> non- valid (NULL) value.

A-ha! That explains where it came from!

I had a work-in-progress patch to add a QMaybe<T> type which would allow you 
to keep the nullability even outside QVariant.

The name comes from Haskell. See http://en.wikipedia.org/wiki/Maybe_type.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120821/a3ef3602/attachment.sig>


More information about the Development mailing list