Open Strilanc opened 6 years ago
Thanks for this. We'll take a look.
Thank you for the feedback!
Note that changes to the Q# language are subject to our language design process. At this point we are not ready for contributions implementing this feature yet. This issue will migrate to the appropriate repository in the near future and will be processed there.
I'm going to transfer this issue to the qsharp-language repo, since that's now the proper place for language suggestions.
I've noticed myself often implementing
body
blocks exactly as follows:which significantly reduces code duplication in cases where the controlled version of an operation only needs to control a few sub-operations, and you want both the controlled and uncontrolled versions of the operation.
I think the language should allow me to replace this boilerplate with just
body auto
, assuming the controlled block has been specified.