Skip to content

Navigation Menu

Sign in
Sign up

Builtin interfaces for some language features #12

Open

Description

Now that the iterator interface has been mentioned in #10 (comment) i think it'd be nice to expand that context and make available some language features via interfaces.

For example, equatable:

type equatable[T] interface {
 Equals[T](T) bool
}

That would enable this:

if myCustomType == myCustomType2 {
// stuff
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /