-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
We need to be able to define new Traits. Haskell's typeclass definition looks like:
class Show a where
show :: a -> StringThere's a variety or reasons why I don't like this syntax.
Rust's trait definition looks like:
pub trait Summary {
fn summarize(&self) -> String;
}This is closer to what I want (but obviously pub goes away and &self should (not be borrowed) and have a better name like object or something. And I don't like the fn keyword either.
Perhaps something like this:
trait Summary {
summarize : a -> String
}
Metadata
Metadata
Assignees
Labels
No labels