On Sat, Sep 8, 2018 at 1:16 PM, Larry Clapp <la...@theclapp.org> wrote:
>
> The draft proposal says
>
> "The body of a contract may not refer to any name defined in the current
> package"
>
> but then later has this example
>
> package move
>
> contract counter(x T) {
>  var _ int = x.Count
> }
>
> contract counters(T1, T2) { // as with a func, parameter names may be
> omitted.
>  // Use contract embedding to say that both types must have a
>  // Count field of type int.
>  counter(T1)
>  counter(T2)
> }
>
> counters refers to counter.
>
> So no names except other contracts?

Yes, I suppose so.

Probably we should just drop the restriction until we see from
experience whether it seems to be necessary.  My concern was that
referring to a name defined the same package would make those names
part of the contract, perhaps surprisingly.  That is, it would mean
that changes the definition of those names would change the contract.
But likely it's not worth worrying about.

Ian

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.

Reply via email to