Skip to content

Protocols #14

@nickwanninger

Description

@nickwanninger

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
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions