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

Any way to declare const variables? #14

Open
Doruk-Aksoy opened this issue Feb 19, 2018 · 1 comment
Open

Any way to declare const variables? #14

Doruk-Aksoy opened this issue Feb 19, 2018 · 1 comment

Comments

@Doruk-Aksoy
Copy link

I noticed const keyword isn't allowed. Are there any plans for inclusion of this?

@positively-charged
Copy link
Owner

I thought about adding const variables before. For whatever reason, it did not happen. I will try to implement them, see how it goes.

A side note: The const keyword has one use at this time. The const keyword is used to tell the compiler that the arguments passed to an action-special or a script function are all constant, and that the compiler should use optimized instructions for the function call. BCC can figure out when all arguments are constant and select the appropriate instruction automatically, so there is no need to use the const keyword in this context.

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

2 participants