IppClub / IppClub/YueScript

Mixin Improvements: Override, super()

Open
#84 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
613
Forks
45
PR merge metrics
No merged PRs in 30d

Description

I would like added features for mixins to make them more inline with direct inheritance in terms if power and flexibility.

  1. The ability to override mixed in fields and functions. Currently mixin functions take precedence over what are defined in the class including them, meaning you cannot override them.

  2. The ability to call super() in an overridden mixed in function, to call the original implementation from the class it was from.

With these added features, mixins can be used more like proper interfaces with default implementations, and in some cases replace prototypical inheritance.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named. Start by locating the compiler code and tests that implement mixins, then determine how mixed-in fields and functions currently take precedence and how inheritance handles super(). Done means both override behavior and calls to the original mixed-in implementation are defined and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.