The attached code prints false instead of true. However, there is no general way to get this comparison right, so it should probably be disallowed entirely (or alternatively, WI might grow a paragraph about "object identity vs. object equivalence" in the Advanced Phrases section).
Steps to reproduce :
The Cave is a room.
Frobozz Magic Description Company Catalog relates one description of numbers to one number.
The verb to be available on page implies the Frobozz Magic Description Company Catalog relation.
To decide what description of Ks is cast (D - a description of values of kind K) to value:
Decide on D;
When play begins:
Now cast even numbers to value is available on page 2;
Showme whether or not cast even numbers to value is available on page 2;
Additional information :
The descriptions stored in this relation are otherwise fully functional, aside from not printing very usefully e.g. in RELATIONS output. This particular case could be solved by interning or constant folding the description literal, though I'm uncertain whether it's worth it in the general case.
It is not possible to get this comparison right because descriptions can be arbitrarily complicated. You could ask whether "numbers which are counterexamples to the Goldbach conjecture" is equal to an empty description, for example. This particular case could be solved by interning or constant-folding the literal, but that's not going to work in the general case.
Finally, you can still retrieve the contents of this relation by using the phrase "list of descriptions of numbers that relate to N by the Frobozz Magic Description Company Catalog relation", so disallowing this won't actually break anything.
Side note: Why is "cast [description] to value" not already in the standard rules, given how easy it is to write and how many things break without it?
Reported by : NYKevin
Description :
The attached code prints false instead of true. However, there is no general way to get this comparison right, so it should probably be disallowed entirely (or alternatively, WI might grow a paragraph about "object identity vs. object equivalence" in the Advanced Phrases section).
Steps to reproduce :
Additional information :
The descriptions stored in this relation are otherwise fully functional, aside from not printing very usefully e.g. in RELATIONS output. This particular case could be solved by interning or constant folding the description literal, though I'm uncertain whether it's worth it in the general case.
It is not possible to get this comparison right because descriptions can be arbitrarily complicated. You could ask whether "numbers which are counterexamples to the Goldbach conjecture" is equal to an empty description, for example. This particular case could be solved by interning or constant-folding the literal, but that's not going to work in the general case.
Finally, you can still retrieve the contents of this relation by using the phrase "list of descriptions of numbers that relate to N by the Frobozz Magic Description Company Catalog relation", so disallowing this won't actually break anything.
Side note: Why is "cast [description] to value" not already in the standard rules, given how easy it is to write and how many things break without it?
imported from: [Mantis 2050] You can compare descriptions for equality, but there is no correct way to do that.