Hi @anthony, there are two differences:
- The
controller x can
syntax implicitly addsx
to the list of observers. For the second syntax, you have to addx
to the list of observers separately. - The second form is more general. Specifically, the controller expression can refer to the fields of your choice argument. You make use of that in your example above: The controller
signer
is only introduced by the choice argument. With thecontroller … can
syntax, the controller expression can only refer to the fields of the template so you will get an error if you try to rephrase your second example using thecontroller … can
syntax. You can find more information on that at https://blog.daml.com/daml-driven/daml-does-yoga-an-introduction-to-flexible-controllers
I hope that helps!