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

Protocols #14

Open
nickwanninger opened this issue Sep 3, 2018 · 0 comments
Open

Protocols #14

nickwanninger opened this issue Sep 3, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@nickwanninger
Copy link
Collaborator

Much like go's interfaces, but would act much like generics + limitations

Possible Syntax:

protocol Addable {
  Add(Addable other) Addable
}

Classes would automatically implement a protocol if they have the methods required.

Example usage would be for string()

protocol Stringable {
    string() string
}
@nickwanninger nickwanninger changed the title **protocols** protocols Sep 3, 2018
@nickwanninger nickwanninger changed the title protocols Protocols Sep 3, 2018
@nickwanninger nickwanninger self-assigned this Sep 3, 2018
@nickwanninger nickwanninger added the enhancement New feature or request label Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant