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

Trac: Allow indirect variable lookups #197

Open
MichaelClerx opened this issue May 5, 2020 · 2 comments
Open

Trac: Allow indirect variable lookups #197

MichaelClerx opened this issue May 5, 2020 · 2 comments
Labels
enhancement New features, incremental improvements long term Low priority issues that need solving _eventuall_

Comments

@MichaelClerx
Copy link
Contributor

https://chaste.cs.ox.ac.uk/trac/ticket/2019

That is, lookup a name which evaluates to a string, then lookup the variable with that name. This would allow protocols to be parameterised on the name of a parameter to scan over, for instance.

Should mainly need some additions to Environment::Lookup method, with an extra parameter (default true) saying whether to allow indirection (calls to delegatees would pass false). Also some handling in AssignmentStatement and other places which can set variables.

@MichaelClerx
Copy link
Contributor Author

Not sure I understand this one

@jonc125 jonc125 added enhancement New features, incremental improvements long term Low priority issues that need solving _eventuall_ labels May 6, 2020
@jonc125
Copy link
Contributor

jonc125 commented May 6, 2020

It's a new language feature proposal. Would add strings as a fundamental datatype (alongside numbers), let you have vectors of strings (useful for plot keys), and let you do the equivalent of Python's getattr. Probably not needed if we start allowing arbitrary Python for post-processing though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, incremental improvements long term Low priority issues that need solving _eventuall_
Projects
None yet
Development

No branches or pull requests

2 participants