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

Prototypes #1

Open
TheBerkin opened this issue Oct 11, 2020 · 0 comments
Open

Prototypes #1

TheBerkin opened this issue Oct 11, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request prototypes Related to Rant prototypes stub Issue needs expansion

Comments

@TheBerkin
Copy link
Member

TheBerkin commented Oct 11, 2020

Add support for prototype functions to map objects for OOP workflows, custom access logic, etc.

This is a WIP issue for ongoing design work on prototypes.

Getting and setting prototypes

Map prototypes can be retrieved and assigned with [proto] and [set-proto] respectively:

<$myobj = @()>
<$myproto = @(proto-method = [?]{foo})>
[set-proto:<myobj>;<myproto>]
[proto:<myobj>] # [map(1)]

Prototype methods

Elements of a map's prototype act like elements of the owning map.

<$myobj = @()>
<$myproto = @()>

[$myobj/test] { foo }
[$myproto/test] { bar }

[set-proto: <myobj>; <myproto>]

[myobj/test] # bar
@TheBerkin TheBerkin created this issue from a note in Rant 4 Beta Roadmap (To do) Oct 11, 2020
@TheBerkin TheBerkin self-assigned this Oct 11, 2020
@TheBerkin TheBerkin added enhancement New feature or request prototypes Related to Rant prototypes labels Oct 11, 2020
@TheBerkin TheBerkin moved this from To do to Research / Investigate in Rant 4 Beta Roadmap Oct 24, 2020
@TheBerkin TheBerkin added the stub Issue needs expansion label Apr 9, 2021
@TheBerkin TheBerkin moved this from Research / Investigate to To do in Rant 4 Beta Roadmap Apr 18, 2021
@TheBerkin TheBerkin moved this from To do to In progress in Rant 4 Beta Roadmap Apr 27, 2021
@TheBerkin TheBerkin moved this from In progress to Research / Investigate in Rant 4 Beta Roadmap Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prototypes Related to Rant prototypes stub Issue needs expansion
Projects
Rant 4 Beta Roadmap
  
Research / Investigate
Development

No branches or pull requests

1 participant