Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature Flags (Compiler flags) #89

Open
tabularelf opened this issue Sep 16, 2023 · 0 comments
Open

Feature Flags (Compiler flags) #89

tabularelf opened this issue Sep 16, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request high priority Important

Comments

@tabularelf
Copy link
Contributor

tabularelf commented Sep 16, 2023

What is your feature request?

Currently there's a few specific features in Catspeak that could be altered or changed, but without any direct way of controlling that, it's hard to do. Whether it'd be for more speed reasons or for disabling or enabling specific logic within Catspeak. With this feature request, featureFlags would be exposed to the interface, allowing users to flip on/off specific features and logic before compiling their code.

Please describe in detail how you expect this new feature to behave.

Take for example with variable access. Catspeak currently does everything via struct accessors, that's mainly because the struct hash functions aren't in LTS. But as someone who doesn't use LTS, I'd love to use those instead. Especially because they're a lot faster.
So if we had something like this

Catspeak.interface.featureFlags.useVariableHash(true);

Then Catspeaks codegen will instead switch over to using struct hash versions, speeding variable access immensely.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request high priority Important
Projects
None yet
Development

No branches or pull requests

2 participants