-
Notifications
You must be signed in to change notification settings - Fork 2
Interface implementation #18
Copy link
Copy link
Open
Description
Draft on how interfaces will be implemented:
import "std.csp";
type Foo: interface {
fn foo(self: &Foo): i32
};
type Bar: struct {
x: i32
};
# how to implement Foo for Bar?
fn main(): i32 {
let bar = Bar::{0};
(&bar: &Foo).foo();
<- 0;
}
The main question is: how should the syntax for implementing Foo for Bar look like?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels