-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
Shared variables and functions #15
Comments
I have settled on the terminology of "shared" variable and function. Updates to the design:
|
We can implement a predefined |
Was this |
@krader1961 Is there any alternative today? |
Shared variables have more complex semantics than simple variables. Notably, reading a shared variable can fail while reading a normal variable never fails. The underlying store API is still there. This is in scope for #1032. |
Persistent variables and persistent functions are shared across multiple sessions and preserved on shell exits. They are useful for passing data or code between concurrent sessions without (explicit) serialization/deserialization. In particular, they are ideal for configuration variables and functions and may serve as a more advanced clipboard facility.
The ideas are taken from fish, which has universal variable and autoload functions, with quite different implementations. All universal variables are stored into one file, and
fish
instances talk to an agent,fishd
, to access them. In the case of autoload functions, however, each function is stored into a separate file and there is no agent to coordinate the access. Users are encouraged to manage autoload functions manually.Open questions:
elvished
package already includes a prototype of the agent.)The text was updated successfully, but these errors were encountered: