[gecode-users] Some Feedback on GecodeJ

andrew cooke andrew at acooke.org
Mon Sep 15 14:00:24 CEST 2008


You're free to ignore my suggestions, so I won't argue with you, except to
correct a few errors and mention how disappointed I am to hear that
GecodeJ is not intended to be used except for teaching.

- I mentioned making Javadoc myself, but it still has the doxygen markup. 
The same markup appears in IDE context-sensitive help.

- Iterable, not Iterator.  They are different things.

- The static methods defined in Gecode seem to be be, in the main,
convenience functions - shorthand.  Defining a subclass of Space with
extra convenience methods is not a statement that they "belong" there in
any engineering sense; it's just putting stuff to hand in the place where
people expect to find it (for example, via auto-complete).  As with the
Javadoc issue you are making things harder for users for no particular
reason.

- I'm afraid I don't understand your argument "The copy constructors
cannot be made generic, since the variables that need to be updated in a
Space subclass must be updated there."  Surely a generic method can call a
constructor itself (and since generics are implemented by erasure it is
hard to see how introducing them makes anything impossible).  The point is
not that a constructor is not needed, but that the interface convey the
requirements to the user.

Given those, I do wonder if you spent much time considering my comments,
or simply dismissed them out of hand.

Some extra points since I have used this a little more:

- The constructors for VarArray appear to use generics incorrectly; the
class type of the contents should use the generic variable defined in the
opening class statement.

- Upper bounds on integer ranges are inclusive.  Even in C++ this is odd
(see Koenig's C++ Traps), requiring "-1" in a lot of code.  Software
almost always uses "[)" ("half open ranges"), not "[]".

Andrew






More information about the gecode-users mailing list