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

Add support for constant fields and variables #51

Closed
jaccomoc opened this issue Jan 3, 2024 · 0 comments
Closed

Add support for constant fields and variables #51

jaccomoc opened this issue Jan 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jaccomoc
Copy link
Owner

jaccomoc commented Jan 3, 2024

Jactl does not support static class fields in order to not have to deal with thread synchronisation issues and because it is intended to be run distributed applications where the idea of a single class value across multiple instances makes no sense.
Since the problem with static class fields is the fact that they can be changed we could support read-only static fields that are simple types.
This would allow Jactl to provide symbolic names for constants that might be used in several places in scripts and to allow them to be matched against in switch expressions (for example).

@jaccomoc jaccomoc added the enhancement New feature or request label Jan 3, 2024
jaccomoc added a commit that referenced this issue Jan 3, 2024
jaccomoc added a commit that referenced this issue Jan 3, 2024
…on resolver into separate SwitchResolver class
@jaccomoc jaccomoc changed the title Add support for simple static final class fields Add support for constant fields and variables Jan 4, 2024
jaccomoc added a commit that referenced this issue Jan 4, 2024
jaccomoc added a commit that referenced this issue Jan 4, 2024
jaccomoc added a commit that referenced this issue Jan 9, 2024
…percase and updated language guide to include switch documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant