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

Toggle for Struct Hash over Struct Accessor #90

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

Toggle for Struct Hash over Struct Accessor #90

tabularelf opened this issue Sep 16, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request low priority Not important

Comments

@tabularelf
Copy link
Contributor

What is your feature request?

Catspeak uses struct accessors mainly because LTS does not support it. But as someone whose making their game in Monthly, I'd love to be able to use them. The only issue is that, there's no way of changing that behaviour at all without diving deep into the code and swapping out a bunch of get/set access calls.

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

If #89 gets added, this could be directly exposed as a feature flag, allowing variable hashes to be toggled on or off.
This means that while LTS may not be able to use it, for those who aren't on LTS, they can enable it for themselves to gain a free performance boost.

The idea for the most part replaces the __catspeak_expr_*_set/get__ functions with two versions. One that's the same behaviour as it is now, and one that's for hashs. If the feature flag has it off, hashes will be -1 (or non-existent for saving memory)

@tabularelf tabularelf added the enhancement New feature or request label Sep 16, 2023
@tabularelf tabularelf changed the title Allow the option of replacing the struct accessors for struct hash set/get for variables. Toggle for Struct Hash over Struct Accessor Sep 16, 2023
@katsaii katsaii added the low priority Not important label Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Not important
Projects
None yet
Development

No branches or pull requests

2 participants