Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

Inheritance in terms of traits #17

Open
hayd opened this issue Jul 10, 2015 · 0 comments
Open

Inheritance in terms of traits #17

hayd opened this issue Jul 10, 2015 · 0 comments

Comments

@hayd
Copy link

hayd commented Jul 10, 2015

Just as a proof of concept, could a macro be used in place of inheritance. e.g. if we had

type Int <: Integer

could we replace this as a trait

@traittype type Int <: Integer
# to be the same as (I think)
type Int
@traitdef Integer{X}
@traitimpl Integer{Int}

so that any defined types on traits could dispatch off Integer.

Perhaps this should be on SimpleTraits ?` This is "syntax that could work for base"... and then be extended to MI :).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant