On 2009-Jul-12, at 12:43 pm, Daniel Ruoso wrote:
role R1 {
  method foo() {...} # degenerates to interface
}

Just wondering: since merely declaring an interface will be common enough, should we be able to say simply "method foo;" inside a role, and drop the {...}?

class Bla does R2 {
  method foo {
    # implementing here is natural, since the role only
    # declared a stub, it's even a warning not to implement it
  }
  supersede method bar  {
    # explicitly tells that I want to ignore the implementation
    # in the role. nextsame wouldn't find the role implementation.
  }
  augment method baz {
    # explicitly tells that I want to provide an additional
    # implementation besides the one in the role. nextsame would find
    # the role implementation.
  }
}

Works for me. I thought having "suggest" to make it work the other way around sounded useful too, but perhaps you think in practice it wouldn't be worth it?


-David

Reply via email to