Open mathrick opened 3 years ago
great question :-) early on we couldn't decide what the correct behavior should be;
agree, we should throw an error rather than silently ignoring the later items
one example, we don't want the behavior to be EXACTLY the same as [(s1, s2)]
is that if s2
evaluates to SKIP
the list iterator wouldn't see the SKIP
if we can talk through it more and convince ourselves that there isn't a better purpose for list-of-specs than to basically have tuple-like behavior we can give it that behavior
As far as I can tell, the behaviour of a
[...]
spec (inAuto
mode) with more than one element in the list is not documented anywhere in the docs, and it certainly isn't very friendly. I continuously bump into this, and then spend a lot of time debugging the problem, before I realise what the issue is.The current behaviour seems to be that for a spec of
[s1, s2, s3, ...]
, anything beyonds1
will be silently ignored and have absolutely no effect. That is both unexpected, and very unfriendly to the user, because it makes the debugging experience mystifying. Especially sinceInspect()
will also get ignored, ie.:Is there a reason it isn't equivalent to
[(s1, s2, s3, ...)]
, and could it be changed to be equivalent? If not, at the very least it should throw an error, but I really think it should be allowed and meaningful.