[Gambas-user] Public controls

Tobias Boege taboege at ...626...
Tue Jul 26 18:01:45 CEST 2016


Hi list,

I have a history question. I was told there was quite a debate among
contributors to the Gambas-Buch.de, over whether public controls on a form
are a good or bad thing.  Personally, I'm by experience a fan of information
hiding, and IIRC I read a statement of Benoit's where he says that there are
no global variables in Gambas because it's poor practice / not OOP.

Now global variables is arguably a different topic as public members, but
making controls public is a serious violation of information hiding, in
almost every case, and there is even an option to make all controls public
by default. Seeing that none of these features is used anywhere in the
Gambas source tree *except* for [1], my question is:

  Why were these options introduced in the first place? Did users just
  ask for it often enough?

Also rest assured, I didn't take part in that debate and I'm not fishing for
an authoritative argument here. I'm just curious.

Regards,
Tobi

[1] app/src/gambas3/.src/Help/FHelpBrowser.form:104

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list