geode icon indicating copy to clipboard operation
geode copied to clipboard

Protocols

Open nickwanninger opened this issue 7 years ago • 0 comments

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 avatar Sep 03 '18 18:09 nickwanninger