From: Daniel K. <qua...@gm...> - 2014-08-29 00:14:43
|
2014-08-29 1:09 GMT+01:00 David Seikel <on...@gm...>: > On Thu, 28 Aug 2014 22:23:03 +0100 Tom Hacohen <to...@st...> wrote: > > > On Thu, Aug 28, 2014 at 7:51 PM, Cedric BAIL <moa...@gm...> > > wrote: > > > > > On Aug 28, 2014 6:10 PM, "Daniel Kolesa" <qua...@gm...> wrote: > > > > > > > > 2014-08-28 17:06 GMT+01:00 Cedric BAIL <ced...@fr...>: > > > > > > > > > Hello, > > > > > > > > > > On Thu, Aug 28, 2014 at 5:12 PM, Tom Hacohen > > > > > <tom...@sa...> wrote: > > > > > > It's been ages since we last complained about the existence of > > > > > > Eina_Bool. We all hate it and think it's useless. It's too > > > > > > long to > > > type, > > > > > > and redundant. "bool" has been available for ages now. Same > > > > > > goes for "true" and "false". I think we should kill Eina_Bool > > > > > > and start using those. It doesn't have to be a sed (though we > > > > > > could sed it out from > > > all > > > > > > of our sources), it can be gradual. > > > > > > > > > > > > If someone thinks there's a platform out there that doesn't > > > > > > have > > > "bool", > > > > > > we can just add a platform check and define it if missing. > > > > > > > > > > > > What do you think? > > > > > > > > > > That it is globally a bad idea. The bool type should not be > > > > > used in any of our public header (due to how poor the standard > > > > > define it). It also should not be used in any of our bitfield > > > > > as nobody knows its size. So starting to use it is sure to > > > > > trigger a mess at some point. So if it's just an issue of > > > > > typing, make a macro in your editor and be done with it. > > > > > > > > > > > > > For API it's fine. For bitfields it sucks but we can just replace > > > > all Eina_Bool bitfields with unsigned char. > > > > > > It's not. It break ABI. There's no compatibility between compiler > > > on its size. No ffi also. And yes, it would break bitfield. > > > > > > > As I was telling Quaker, it's less about getting rid of Eina_Bool, > > and more about getting rid of EINA_TRUE and EINA_FALSE in favour of > > their nicer counterparts. Those are the ones we type all the time, > > not Eina_Bool itself. > > If it's a matter of typing, why not just create macros in Eina that wrap > Eina_Bool - ebool, etrue, efalse? Then we can have our cake and eat it > to. Otherwise as others said, it's a big API break. > Moving from Eina_Bool to bool is mainly an ABI break, which is worse. Tom was mainly talking about using the true/false values from stdbool.h though, which are defined to be the same as integer constants 1/0. Thus, it's perfectly fine to kill off EINA_TRUE and EINA_FALSE and use true/false instead. > > -- > A big old stinking pile of genius that no one wants > coz there are too many silver coated monkeys in the world. > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > |