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
Should task/forall intents ignore locale-private variables? #14143
Comments
Definitely: I'd expect |
The main question to me is how special we want to make locale-private variables. For example:
Preferences? |
In #16716 (comment) @bradcray suggested to consider replacing each locale-private variable using other existing language constructs. Here are the locale-private variables that we rely upon right now:
|
My thinking here is that it seem as though different use cases may use locale private variables in different ways, and there aren't very many total uses of them in our code base (and some of them are things we want to replace anyway, like the chpl_localeTree). So rather than adding/maintaining special-cases in the compiler for them, is there something we could do to implement them using other features? Or, if we thought they were a good feature, to turn them into a user-facing feature with well-defined semantics? |
Locale private variables aren't an official feature, but I use them in some low-level tests, and I occasionally get hit by task/forall intents preventing me from accessing the current locales private version. e.g for something like:
You get
2 2
where I would expect1 1
This is because task-intents are giving locale-1 a reference to locale-0's private var. This always confuses me at first and makes me wonder if we should ignore locale-private variables for task/forall intents (or maybe for ref intents, provide a reference to the private instance?)
The text was updated successfully, but these errors were encountered: