gss / engine

GSS engine
http://gss.github.io
MIT License
2.86k stars 105 forks source link

x > y should be a permissible constraint #181

Open dcorbin opened 9 years ago

dcorbin commented 9 years ago

I was a bit surprised that this constraint seems to have no effect.

alpha[width] > 500 !require;

Simply changing it to

alpha[width] >= 500 !require;

and it worked great.

Inviz commented 9 years ago

The problem is that 500.0000000001 is a valid solution to > 500 constraint. This is just a convention for everybody to always keep that fact in mind. There's some code to generate >= 500 + 1, but it may not be used at the moment.

dcorbin commented 9 years ago

Sure. But I'm looking at ti from a usability perspective. People will expect it. I did. No error was generated, and i wasted a chunk of time. Generating an error would be an improvement, but making it work they way most folks will expect it to has value.