rokucommunity / rokucommunity/brighterscript

Add `implements` keyword for Classes

Open
#1,318 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

BrighterScript enhancement
Dominant language
TypeScript
Stars
208
Forks
68
Avg merge
8h 39m
Merged PRs (30d)
39

Description

  • Add a new keyword implements to explicitly say which interfaces a class conforms too.
  • A class can explicitly implement multiple interfaces
  • If a class uses the implements keyword, then validation is performed on the class to ensure that the set of its public members are compatible with all the interfaces referenced by the keyword.

Example:

interface Flier
    function takeOff(altitude as float) as boolean
end interface

interface Quacker
    sub quack()
end interface


class Duck implements Flier, Quacker    ' validation error - quack() is not included
    function takeOff(altitude as float) as boolean
       return false
   end function
end class

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 files, tests, or entry points are named in the issue. Start by mapping how class and interface syntax is parsed and validated; done means supporting multiple interfaces and reporting when a class's public members do not satisfy them.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.