[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GO engine interface
Henrik Rydberg wrote:
[snip]
> Some comments on the codes of Weimin Xiao (WX) and P.J. Leonard (PJL):
>
> I think PJL is right, WX's class grasps over a little bit too
> much. On the other hand, WX's class uses very few 'stray classes',
> like Point and such, whereas PJL's class use it quite a lot. I
> strongly suggest we try to make interfaces without such classes,
> since they are very likely to be defined elsewhere in a programmers
> environment. Besides, if one wants a neat interface, one can of course
> always overload the class and do the nescessary type-conversions,
> which I'm sure you're all well aware of. :-)
OK so are you suggesting a wrapper that could be used to insulate the
application from any classes that they do not like ? The wrapper would
use the standard types (int char etc) ?
This would be good for decoupling but bad for effeciency. I think it
would
be nice if a set of basic GO types could be agreed between programmers.
In pubgo :
Point is a simple wrapper for an integer type.
PointCollection is a set of points.
GoString has a set of points and a set of liberties (which are point
collections).
it also has a unique id (which is very important for comparing
strings
see Note).
Is there any disaggrement for the need for such objects ? If there is
aggreement
that all programs require such objects and they require a certain
functionality than
there could be standard library for all to use. Legacy code would need
to provide
an interface to these types but new code could be based on the
predefined types
and develop faster because there will be a base of code that operates
and the
predefined types.
Also if you go for using simple types you lose the posibility of
passing references
to structures to comunicate. This of course will slow things down
considerably
and will exclude techniques that modify a referenced structure (you
would need
to implement more message passing). [ co-operation between remote
processes not
sharing the same address space or machine is another can of worms which
of course
refutes my reasoning ]
cheers Paul.
Note:
Incidently pubgo can also maintian a map that maps an string id onto its
current
id (at some future point in time the string may merge and pubgo will use
the largests
strings id to identify the combined string). This functionality is
implemented as a board
view so if you do not need to use it you do want to.