On Tue, Sep 4, 2018 at 7:41 AM, thwd <sedeveloper...@gmail.com> wrote: > > From the draft proposal I gather two open questions: > - How free or restricted should contract bodies be?
I believe it's useful to have contract bodies simply be arbitrary function bodies, as the current design draft suggests. This is because I believe that is conceptually the simplest choice. You don't have to remember two different syntaxes, one for code and one for contract bodies. You just have to remember a single syntax, one you must know in any case to write any Go code at all. > - How many implicit constraints can be inferred from usage? As few as we can get away with. > If too much syntax is allowed in contract bodies and no implicit constraints > are gathered: > people will copy and paste function bodies into contracts to cover all > constraints. People do suggest that that will happen but I think it is extremely unlikely in practice. It's obviously a terrible coding style, and almost all generic functions have trivial contract requirements. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.