[geekcrypt] Re: Macros Macros everywhere...

  • From: Bill Cox <waywardgeek@xxxxxxxxx>
  • To: geekcrypt@xxxxxxxxxxxxx
  • Date: Thu, 5 Jun 2014 16:28:55 -0400

On Thu, Jun 5, 2014 at 4:06 PM, PID0 <p1dz3r0@xxxxxxxxx> wrote:

> ...but not a single sensibly named variable to be found in 110k lines
> of code. My personal favorite bit of coding lunacy I've found so far is:
>
> #define PLATFORM_BYTE_ORDER BYTE_ORDER
> #define IS_LITTLE_ENDIAN LITTLE_ENDIAN
>
> #if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
> ...
>

This is going to take a lot of work to clean up.  The GUI author seemed to
think that he needed a different class for each use of a string.  For
example, in class Volume, he added class VolumePath with no functionality
other than to convert from all the other string classes!

I don't think we need to worry about cleaning up the code much until after
the first release.  After that, well we need to make a plan...

Bill

Other related posts: