[dmd-internals] type inconsistency in the source code

Daniel Murphy yebblies at gmail.com
Thu Jan 26 18:32:45 PST 2012


Sure, the names used in dmd aren't particularly consistent... but do
you really want to break every open pull request?

On Fri, Jan 27, 2012 at 11:15 AM,  <mrmocool at gmx.de> wrote:
> 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.
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals


More information about the dmd-internals mailing list