Closed erkyrath closed 4 months ago
If bit 4 has not previously been used, and the notation //s
is new, do we need this to be an opt-in feature? It seems to me that it doesn't change previous behaviour except to specify the contents of a bit which was previously unspecified - is there code out there which relies on that bit being always zero?
Maybe? We don't know for sure. It's also possible (I concede unlikely) that some author started setting bit 4 for their own purposes, via the Dictionary
directive.
But also, it's easier for testing if old source compiles to exactly the same game file as before. (Modulo Inform version flag and serial number.) I don't always succeed at maintaining this guarantee, but I do whenever possible.
From I7 discussion:
It would be good for the parser to know that this dict word
PHOTOGRAP
has been used in both singular and plural mode in the source (PHOTOGRAPH
andPHOTOGRAPHS//p
). Then it could make more sensible decisions. But the I6 dictionary cannot currently represent this fact.(Footnote from Graham: "It is arguably time to increase the Glulx dictionary word length from 9 to something much more generous (31, say), but this only makes the issue rarer in practice, rather than fixing it in a principled way." This would be just a matter of setting
$DICT_WORD_SIZE
, which I7 can do, but we're looking at the underlying issue here.)The proposal is to reserve one of the unused dict flag bits (say bit 4) to mean SINGULAR. I6 would set SINGULAR for any dict word usage which has NOUN but not PLURAL. So in the typical I6 definition
...
'coin'
would have NOUN and SINGULAR;'coins'
would have NOUN and PLURAL.If you then wrote
'coin//p'
elsewhere in the code, that word would have NOUN and SINGULAR and PLURAL (because of the dual usage). And this would also occur in the'photograph'
,'photographs//p'
case due to truncation.Following the pattern of https://github.com/DavidKinder/Inform6/issues/259 , you could write
'word//s'
to explicitly set the flag, or'word//~s'
to skip implicitly setting it.The SINGULAR feature would be opt-in, to maintain backwards compatibility. Say
$DICT_IMPLICIT_SINGULAR=1
. Without this flag, bit 4 would never be implicitly set. (But you could still do'word//s'
to set it.)