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

Generate read-only variants of Scheme #73

Open
altavir opened this issue Nov 24, 2021 · 1 comment
Open

Generate read-only variants of Scheme #73

altavir opened this issue Nov 24, 2021 · 1 comment
Labels
feature New feature or request good first issue An issue awaits its hero. Contributions are welcome

Comments

@altavir
Copy link
Member

altavir commented Nov 24, 2021

The Scheme class allows wrapping mutable and read-only dynamic Meta trees and adding a statically typed layer to them.
It is used quite extensively in Plotly.kt to allow observation of properties and dynamic changes.

Currently, Scheme is mutable by default and if used on read-only meta, it creates a mutable layer on top of the read-only base. The idea is to automatically generate a read-only version of mutable Scheme via compiler plugin and use it when SchemeSpec.read operation is used. The same plugin could be used to generate a descriptor from Scheme (#35).

The result could be probably achieved with KSP.

@altavir
Copy link
Member Author

altavir commented Nov 24, 2021

Read-only delegates could allow additional optimizations. Like caching obtained values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue An issue awaits its hero. Contributions are welcome
Projects
None yet
Development

No branches or pull requests

1 participant