[Oberon] NW programming style

John R. Strohm strohm at airmail.net
Tue Sep 6 23:18:14 CEST 2016



--- informujo at aon.at wrote:
> Am 2016-09-06 um 11:32 schrieb Alexander Ilin:

>>   You are forgetting that a left-handed person would prefer to have button 3 as the primary button (being under his/her index finger).
>
> Nope, support for left handers is yet another reason not to give names
> like ML, MM, and MR to the mouse buttons, because the left hander will
> prefer ML to be on the right side etc.
>
>>   But number 1 is hard-coded.
>>   Good luck searching for that number to replace it with 3 - which would be a trivial operation with named constants, and could even be loaded from a configuration file.
>
> Supporting left handers should never require to search and replace every
> single reference to a mouse button within application source code.
> Instead, a simple flag could be provided to switch between enumerating
> the buttons from left to right to the opposite direction.

So you should lock the users into only the configurations That YOU feel are acceptable???

As opposed to letting the user set it up the way HE wants it???  And making it easier for him to do so?

Seriously, the prohibition against hard-coded magic numbers has been established practice for DECADES, and the reasons are WELL-known.


More information about the Oberon mailing list