Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exclude vs override #137

Open
kjx opened this issue Dec 4, 2017 · 4 comments
Open

exclude vs override #137

kjx opened this issue Dec 4, 2017 · 4 comments

Comments

@kjx
Copy link
Contributor

kjx commented Dec 4, 2017

It seems we have two way of saying (almost) the same thing.

Given:

class sup {
    method foo { print "superfoo" } 
}

then

class sub {
     inherit sup 
     method foo is override { print "subfoo" }
}

and

class sub {
     inherit sup exclude foo 
     method foo { print "subfoo" }
}

do almost the same thing. Do we need both? Differences are

  • is override is optional - things still work without it.
  • if you exclude something, it goes confidential required, so I think you have to implement it.
@kjx
Copy link
Contributor Author

kjx commented Dec 4, 2017

see also #77

@kjx
Copy link
Contributor Author

kjx commented Dec 4, 2017

also #44

@kjx
Copy link
Contributor Author

kjx commented Jan 9, 2018

see also #67

@kjx
Copy link
Contributor Author

kjx commented Jan 9, 2018

Another fun twist: can you override (with is overrides) a method that's been excluded?
it seems like you should be able to, although that doesn't quite make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant