Closed tra38 closed 6 years ago
Thanks, this is a useful summary. I ran into this question when making the feature, but didn’t make a call on it then—wanted to see what it was like to use in practice first. So the behaviour is currently undefined. It definitely needs to be documented and communicated through either an error message, or recycling the values (I lean towards the former, but the latter might make sense).
I’ve attempted to address this problem in 9fa89cfedb7015ed5484bf9188f2f9307b8794ac
It cycles by default for now. I may add a toggle that throws an error in strict
mode, but unsure yet if that will be useful or not.
For now, this change ensures that expansion of unique rules will never hang.
To replicate:
The expected behavior (at least to me) is that the medal count would restart - that you would again randomly choose between Gold, Silver, and Bronze. But it's possible that maybe you don't want that sort of behavior, since
$
is supposed to represent unique values, and repeating values again might be seen as somewhat confusing. So maybe it's okay to throw an error if this behavior occurs.