Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to inherit multiple classes #619

Open
sandeshworld opened this issue Aug 7, 2024 · 1 comment
Open

Ability to inherit multiple classes #619

sandeshworld opened this issue Aug 7, 2024 · 1 comment

Comments

@sandeshworld
Copy link

sandeshworld commented Aug 7, 2024

I think being able to extend multiple classes would improve usability quite a bit!

The following is currently possible:

class Parrot extends Pigeon {   
  name = "Parrot"               
  diet = "Berries"              
  extinct = false               

  function say() = "Pkl is great!"   
}

It would be useful to also be able to do something like:

class Parrot extends Pigeon, Pet {   
  name = "Parrot"               
  diet = "Berries"              
  extinct = false               

  function say() = "Pkl is great!"   
}
@holzensp
Copy link
Contributor

This would need signficantly more detail (motivation, how to resolve the diamond problem, etc, etc). This is generally a problem in (nominative) hierarchical type systems, so without further restrictions/requirements, this ask can't be satisfied.

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

No branches or pull requests

2 participants