[haiku-commits] Re: haiku: hrev45444 - headers/private/app headers/os/interface src/servers/app src/kits/interface

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 06 Apr 2013 21:35:55 +0200

On 04/06/2013 05:21 PM, John Scipione wrote:
My goal was not to eliminate the private constant, but to eliminate
having to update in 2 places at once, as you said before code
duplication is evil!

You still have to maintain that constant, you just moved it closer to where the initial change was. I think you should just move it back into the ServerReadOnlyMemory header, and maintain it there. That's a small price to pay for a better separation.

It was laziness on my part of having to keep updating the
ServerReadOnlyMemory file every time I add a color constant that
prompted this change. Should I revert?

At least you introduced a constant that avoids changing the code at more than one place -- that idea should be kept.

Bye,
   Axel.


Other related posts: