On Wed, Jan 13, 2016 at 12:38 AM, Jean-Philippe André <j...@videolan.org> wrote: > Hi Felipe, > > You added the optional type to eina value. I'm not sure what it's point is. > I understand an optional value can be empty (ie. void and not "nil" or 0 or > whatever). > > But I don't understand why this couldn't be implemented inside all standard > values. Add an "empty" property to them. > > Could you explain shortly why we need a special type? I'm sure you had a > good reason :)
Hello jpeg, When implementing a data model for esskyuehl we needed a way to handle NULL values from database for certain columns. The "empty" value is a specific, valid, value for that type. If we added "empty" property to all values in Eina Value, we'd be adding an ambigous information for each use. Is that an invalid value? An indication of an error? Is that a valid value? Equivalent to a NULL Eina_Value? The optional doesn't have this problem, it is the equivalent of a "T + 1" in algebraic data type, with 1 meaning "empty", which would be used when an empty value is possible and is a valid value. That way we don't need to check for emptiness for all current uses of integer Eina Values or some other type, for example. Their semantics are completely intact.. > Thanks in advance, Sorry for the delay of this answer, > -- > Jean-Philippe André Regards, -- Felipe Magno de Almeida ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel