[haiku-commits] Re: r40770 - haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 02 Mar 2011 08:25:51 +0100

On 01.03.2011 23:21, kallisti5@xxxxxxxxxxx wrote:
Author: kallisti5
Date: 2011-03-01 23:21:21 +0100 (Tue, 01 Mar 2011)
New Revision: 40770
Changeset: http://dev.haiku-os.org/changeset/40770

Modified:
    haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesAddOn.cpp
    haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesAddOn.h
Log:
change to kMsg style BMessage; introduce a new BMessage for listitem click 
events so I can implement a BPopUpMenu; style cleanup

[...]

+       static  const uint32        kMsgInterfaceSel = 'ifce';
+       static  const uint32        kMsgInterfaceAct = 'ifac';
+       static  const uint32        kMsgInterfaceCfg = 'ifcf';
+       static  const uint32        kMsgInterfaceTog = 'onof';

This is still not good naming. You have message constants where you basically restrict the interesting and supposed to be meaningful part to three letters. Why?

> +  static  const uint32        kMsgInterfaceSelected = 'ifce';
> +  static  const uint32        kMsgInterfaceInvoked = 'ifac';
> +  static  const uint32        kMsgInterfaceConfigure = 'ifcf';
> +  static  const uint32        kMsgInterfaceToggleEnabled = 'onof';

What's the big deal with spelling out the words? Why should someone have to go look up what "Act" or "Tog" means when reading the code?

Best regards,
-Stephan

Other related posts: