-
Notifications
You must be signed in to change notification settings - Fork 1
Closed as not planned
Labels
dsl 🗒️Issues regarding the domain specific programming languageIssues regarding the domain specific programming languagewontfixThis will not be worked onThis will not be worked on
Description
Is your feature request related to a problem? Please describe.
Not all chains of functions calls and attribute accesses are valid.
Describe the solution you'd like
- Specify behavior protocols
- Repetition (0-n or 1-n)
- Option
- Alternative
- Sequence
- Syntax:
protocol { f* g+ h? (i|j) k }- hereftokare references to callables and attributes (meaning reading accesses) - Can refer to instance methods and instance attributes the next surrounding class (cannot access anything in outer classes if nested)
- Only makes sense in classes since it describes the lifecycle of a single instance
- At most 1 per class
Must only be used in stub files(that's a given if it can only be used in classes)
Semantics
- If a class has a protocol only call sequences that conform exactly to the protocol are allowed. There must be no unmatched call prefix or suffix and nothing unmatched in-between.
- Protocol can be overridden by subclasses. However, the overriding protocol must conform to the overridden protocol. A class can only specify additionally, when its own methods/attributes can be used.
- If a class
Subhas no own protocol, but a superclassSuperhas, instances ofSubmust adhere to the protocol defined inSuper, when using features ofSuper. Methods defined inSub, however, can be used freely. - If a class has no own protocol and neither of its superclasses does, all features can be mixed freely.
Tasks
- Scoping (can point to subterms and functions/attributes defined in the class or inherited from a superclass)
- Validation: referenced functions and attributes must not be static
- Validation: no duplicate names for subterms
- Update Prolog converter
- Creators
- Accessors
- Actual validation that calls conform to the protocol
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
dsl 🗒️Issues regarding the domain specific programming languageIssues regarding the domain specific programming languagewontfixThis will not be worked onThis will not be worked on
Type
Projects
Status
✔️ Done