quilc icon indicating copy to clipboard operation
quilc copied to clipboard

ANON-GATE is risqué

Open stylewarning opened this issue 5 years ago • 1 comments

QUIL> (anon-gate "BUG" (random-special-unitary 2) nil 0)
#<BUG-22 nil 0>

It takes nil to be a FORMAL whose name is nil. I think this would be a common error and should be eliminated.

stylewarning avatar Jul 24 '20 01:07 stylewarning

I'm not sure I see why nil would be passed in in error. It does not seem to have any documented meaning. I do not think it's great to rule out the symbol name "nil". I suppose you could have a special rule that if you want that, you have to use :nil (nil in keyword package).

ghost avatar Jul 06 '21 19:07 ghost