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

Provide metadata for widgets lazily #5085

Open
1 of 3 tasks
wdanilo opened this issue Feb 5, 2023 · 0 comments
Open
1 of 3 tasks

Provide metadata for widgets lazily #5085

wdanilo opened this issue Feb 5, 2023 · 0 comments
Labels
-compiler -libs Libraries: New libraries to be implemented p-low Low priority x-chore Type: chore

Comments

@wdanilo
Copy link
Member

wdanilo commented Feb 5, 2023

This task is automatically imported from the old Task Issue Board and it was originally created by jaroslavtulach.
Original issue is here.


Since #182801491 the libraries team can provide metadata for dynamic widgets. However all such data are computed at once - including tag_values for current self. Certain IDE use-cases would benefit from just knowing there is DisplayAlways and Single_Value_Chooser without evaluating the self.columns names:

@Display Always @Single_Value_Chooser (self.columns.map .name)

The best way to achieve this while keeping compatibility (see discord for more discussions) seems to be to implement lazy attributes to constructors. E.g. allow for:

type Single_Value_Chooser ~tag_values

syntax where ~ means that the tag_values evaluation shall be deferred and evaluated only when needed. Lazy atom fields are useful language feature in general. Not only they can help us solve the problem of "not computing the drop down widgets value uselessly", but they are useful for constructing infinite data structures easily. Having them in the Enso language would significantly improve usability of the language.

We already have a working prototype. The prototype was created in November when working on elimination of Unsafe.set_atom_field. At the end #183578531 has choosen different solution (Meta.atom_with_hole), but the prototype of "atoms with lazy values" exists and helps quite accurately estimate the amount of work needed on the engine side needed to implement this new language feature.

Tasks:

Blockers:

#182801491 blocked
#183578531 blocked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-compiler -libs Libraries: New libraries to be implemented p-low Low priority x-chore Type: chore
Projects
None yet
Development

No branches or pull requests

1 participant