James Edward Gray II wrote:
> On Jun 7, 2007, at 10:07 AM, Andreas Launila wrote:
> 
>> I have added that syntax to the examples to get a feel for it:
>> http://gecoder.lokorin.org/dev/wiki/Syntax_test#constrain_.2A_arguments
>>
>> It's a bit bulkier at times, but is probably more conventional (possibly
>> easier to get to grips with?).
> 
> I agree that it lacks the sex appeal of the RSpec approach.  However, it
> does allow us to avoid wrapping all variables and core class hacking,
> which I consider big wins.  I would be willing to pay the price.
> 

I'm not really sure that the cost compared to the others is that much
lower. The following are the changes necessary to make the others work
as far as I'm aware, please correct me if I'm missing something.

* Custom enums with variables have to be wrapped before use (arrays and
matrices created through the convenience methods are wrapped there).
* It becomes harder to create temporary arrays of variables, e.g. [x,y].
Instead the user has to use variable([x,y]) or something similar (or
possibly IntVar.array(x,y) if that's better).

Beyond that I can not see anything that requires wrapping or altering
core classes (or any other non-gecode classes for that matter).

What I see as a bigger problem of must/must_not is where to fit the
constraint options. It might be necessary to change it around a bit to

variable.<must|must_not> relation(argument)

or something similar for that to work.

-- 
Andreas Launila