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

Improve the function/constant/property interface pipeline #127

Open
katsaii opened this issue Jul 12, 2024 · 0 comments
Open

Improve the function/constant/property interface pipeline #127

katsaii opened this issue Jul 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request high priority Important

Comments

@katsaii
Copy link
Owner

katsaii commented Jul 12, 2024

What is your feature request?

Something like

Catspeak.interface.__tryGetConstant__ = function (data) {
  if (data.name == "thing1") {
    data.value = 1;
  } else if (data.name == "thing2") {
    data.value = 2;
  } else {
    return false;
  }
  return true;
};

which the compiler will call to search for a constant value.

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

Right now using all the weird and wacky expose... methods causes slowdown if a user wants to expose everything. Having greater control over exactly how the Catspeak compiler interprets free variables will be nice for users who don't care about safety.

@katsaii katsaii added enhancement New feature or request high priority Important labels Jul 12, 2024
@katsaii katsaii self-assigned this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority Important
Projects
None yet
Development

No branches or pull requests

1 participant