Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Feature request: Automatic generation of interface for delegation member/class #32

@MondayPM

Description

@MondayPM

Automatic generation of the interface of the delegation object would eliminate the manual creation of the interface delineating the composed functionality:

class Human implements MouthI {
@:forward mouth:Mouth;
}
class Mouth implements MouthI {
}

This is extremely relevant imo as it is often the case that one needs to specify a function parameter as mouth or whatever other interface.

In terms of implementing this:

In a @:forward(i) (would by my preferred declaration, but @:forward("interface") may be more sane) declaration, have an option to specify that you want the forwarding interface appended. Add the delegation class to be interfaced to a nonduplicate set datastructure and add all classes requiring the interface. Generate interfaces and append as specified.

I will most likely implement this this week, but if you could do it that would be amazing as you know the framework and the relevant code I don't imagine would be particularly extensive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions