[dmd-internals] type inconsistency in the source code
mrmocool at gmx.de
mrmocool at gmx.de
Thu Jan 26 16:15:38 PST 2012
I've done a little bit of code cleanup, using bool where apprioriate,
reducing the memory footprint a bit, properly using enums/bitfields for
flags etc.
Unfortunately there is no consistency in the types used in the code.
It even defines some types like d_uns32 but they are very sparsely used.
Even worse there's
// Be careful not to care about sign when using dinteger_t <---
typedef uint64_t dinteger_t;
typedef int64_t sinteger_t;
typedef uint64_t uinteger_t;
virtual dinteger_t toInteger(); <---
virtual uinteger_t toUInteger();
So there's practically no difference between those functions? What's the
deal?
Why the inexpressive aliases?
I would personally love to have a set of types that look natural and clear
like in D, i.e. without some crappy prefix d_ or suffix _t like
int32,uint32,...
But in the end the point is to get some consistency.
Please comment.
More information about the dmd-internals
mailing list