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

_"foo" macro evaluation time #7

Open
stevengj opened this issue Jun 28, 2023 · 0 comments
Open

_"foo" macro evaluation time #7

stevengj opened this issue Jun 28, 2023 · 0 comments

Comments

@stevengj
Copy link

stevengj commented Jun 28, 2023

Currently, the module defines:

macro __str(s)
    gettext(s)
end

This seems questionable to me. The problem is that gettext(s) is evaluated at the time of macro expansion, which for a package will typically happen during the precompilation step

This has the advantage of incurring no runtime cost. But what if the user changes the locale, however? Existing packages won't be recompiled to reflect the new locale.

(One could, in principle, get the best of both worlds if there were a way to make the package cache dependent o the locale, so that packages using Gettext automatically get recompiled if the locale changes. I don't think there is currently a way to do this, however.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant