On Sun, Jan 8, 2017 at 11:49 PM, Arnaud de Montard <[email protected]> wrote:

> I have no "religion" about one method or setter+getter, it depends. My
> only personal hate about setters and getters is naming, more exactly the
> verb position.



That's object-action vs action-object. When I drank the accessor method
Koolaid I had to decide on a naming convention and I chose object-action
for two reasons.

One was that my most of my personal computer background was on on the Mac
which is object-action in that we highlight some text, for example, and do
something with it. In contrast, the DOS and Windows world where the
paradigm was action-object - going back to Wordstar, where you would being
a marked block of text type some text and then end a marked block of text.

The other reason was that my focus is on the data. The method
*GRID_LineSel_Set* sorts with other methods that involve lines, for
example. When using type ahead, selecting the getter means that I just hit
tab or, if I want the setter, all I have to do is hit the down arrow and
then tab. Similarly, my variables have a type suffix at the end of name,
not at the front.


--
Douglas von Roeder
949-336-2902
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to