Strange implicit slot filling

Please fill out these questions for all feature requests and bug reports. If you're requesting a feature, please let us know why this feature is important or useful, not just what it should do.

  1. What browsers show this problem? Probably all
  2. Please share an example project (if possible).
  3. Describes the steps to reproduce this issue. Put a custom block with one or more c-shaped slots that has blocks with empty slots in one or more of said c-shaped slots, put that in a run block, add a number of inputs to the run block equal to the number of empty slots, and run the run block.
  4. What does Snap! currently do? In each C-shape command slot, it fills the empty slots starting with the first "with inputs" input to RUN
  5. What should Snap! do instead? Fill them in continuing from wherever it was before the C-shape command slot

Is this bug a security concern? If so, please do not post security concerns directly to the forum. Please email us at Thank you!

its not a bug.the bug showcase block is a ring

No, I agree with the OP. This can't be the intended behavior, especially the one that skips from 1 to 3.


run this script and I think you'll understand what happens

The c slot is an implicit ring so it should do what a ring does.

Hmm... most of these should not work or throw an error, @18001767679 is right that the bug showcase C-slots should be equivalent of rings.
Investigating, thanks!

1 Like

Embedded rings are probably called with copy of the entire inputs array. Just like

bug_ implicit slot filling script pic (4)

A least, ring should be called with subarray started at first empty slot global index.
bug_ implicit slot filling script pic (5)

1 Like

If you give a ring explicit formal parameters, then there is no implicit substitution done.

My understanding is that rings protect their bodies against implicit substitution by an outer ring.

But I also remember a discussion way back in the mists of time in which we decided that a C-slot is not the same as a visible gray ring with respect to substitution. The idea is that you should be able to use a HOF without understanding anything about rings and what they mean. And so, something in the body of a FOR should be eligible for substitution from outside the FOR.