From: James Edward Gray II Date: 2007-06-07T21:54:07+09:00 Subject: Re: Gecode/R - Request for syntax feedback On Jun 7, 2007, at 3:58 AM, Andreas Launila wrote: > Andreas Launila wrote: >> James Edward Gray II wrote: >>> On Jun 6, 2007, at 12:35 PM, Andreas Launila wrote: >>>> Something more on the form of the rest of the syntax >>>> would probably be >>>> >>>> constrain element(array, x).equal(y) >>>> >>>> It just doesn't read as well to me. Maybe there's a better way of >>>> representing constraints where the function has to take multiple >>>> arguments, such as returning an helper with only one method, >>>> i.e. as >>>> follows. >>>> >>>> constrain element(x).in(array).equal(y) >>> I would say avoiding core class modification is important. If that >>> means we need element(), that's probably just a price we need to >>> pay, in >>> my opinion. >>> >>> See my earlier comment about proxy objects for another option >>> though. >>> >> >> I will write up some similar syntax examples with proxy objects to >> see >> how big the difference is. >> > > Examples: http://gecoder.lokorin.org/dev/wiki/ > Syntax_test#Proxy_objects That page talks about how we loose some convenience in that we need to now wrap simple IntVars. I'm not sure that's 100% necessary though. If we built the class, we should be able to count on it having what we need. The wrapper could just be for Enumerables and/ or custom data structures, I think. Double-check my logic there though. James Edward Gray II