Jay Pipes wrote: > Brian Aker wrote: >> Hi! >> >> I saw this gem from Mats today: >> >> "I would prefer if we never used typedef to introduce aliases for >> struct/class/union, they cause more problem that it's worth, and they >> are not >> needed in C++ at all." >> >> We should do this as well. There are only a few places where we should >> be using typedef at this point, and even in those few cases I still >> wonder if we should be (mainly I think of ha_rows). > > +1. At least, we should strongly prefer NOT to typedef. > > Agreed that in the case of ha_rows, it might be useful. > > But stuff like this: > > typedef ptrdiff_t my_ptrdiff_t; > > is, well, silly. > > And stuff like: > > typedef Item COND; > > is just obfuscating the code. > > Where I *do* think typedef's are useful is within C++ STL-like classes > where I can typedef value_type or size_type internally to the class...
Yes. And this is a standard thing so it actually serves to make the code less obfuscated. Completely agree. Monty _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

