gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] switching to multiple boards


From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] switching to multiple boards
Date: Sat, 16 Apr 2005 01:25:23 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

Paul wrote:
> The obvious name would be `board' or `state'.  Names like `bs' are not
> obvious.  However, if Gunnar doesn't want to type, it seems we'll have
> to use those.

It's not just about typing but reading as well. What we discuss is a
method to implement object orientation in C, where the object pointer
is passed around between the functions. In a typical object oriented
language the member variables would be accessible without any pointer
indirection at all. This is the basic reason why I want a short name
for these. See for example influence.c where the object pointer is
consistently called q. Would the code in, say, value_territory() gain
from changing q into something logical like "influence"? At least I
would find it more difficult to identify the significant information
in the code that way. Now "q->" is easy to visually distinguish as an
identifier for member variables.

One can notice that some coding styles for C++ (and maybe Java?)
require member variables to be prefixed by "m_", which visually is
kind of similar.

But well, I can live with goban too. Or we could borrow a little more
from object oriented languages and call the object pointer "this". The
latter might introduce some confusion for people who are used to
languages where "this" is a keyword, however.

/Gunnar




reply via email to

[Prev in Thread] Current Thread [Next in Thread]