Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MikeAlMartinez
Reel Rookie

Tagging of unused variables - runtime consequences of use

This recent blog post details a new "Feature" of the Roku OS 11 Brightscript and so called "Tagging of unused variables".

Codebases I work in and libraries I use make extensive use of `_variableName` style variables to indicate that this variable shouldn't be used externally. It quickly highlights the variables to a developer which are implementation details specific to the task at hand and aren't typically exposed and relied upon outside of the component in which they are defined. It's a common convention that happens across a number of programming languages.

What is the runtime impact of using such variables? Is it only a way to tag a variable as unused and therefore any unused warnings aren't generated? Or does the VM see a variable beginning with an underscore and decide it's safe to ignore such variables even if they are used extensively.

The example in your blog post seems to relate to an unused function parameter. Does this convention only affect variables as function parameters or does it affect all variables?

0 Kudos
3 REPLIES 3
makaiguy
Community Streaming Expert

Re: Tagging of unused variables - runtime consequences of use

@MikeAlMartinez-

You've posted to a forum for Roku users, where few, if any, will be able to help. The Developers forums are a couple of doors down the hall:  https://community.roku.com/t5/Developers/ct-p/channel-developers

Roku Community Streaming Expert
I am not a Roku employee, only a user like you.  Please, no support questions via private message -- post them publicly to the Community where others may benefit as well.
If this post solves your problem please help others find this answer by clicking "Accept as Solution.".

Streaming Stick 4K+ 3821 | Streaming Stick+ 3810 | TCL Roku TV 43S245/C107X
0 Kudos
MikeAlMartinez
Reel Rookie

Re: Tagging of unused variables - runtime consequences of use

Thanks for the heads up! I think I've found out the answer elsewhere. But will tag that forum as the place to go in the future.

0 Kudos
eclaires
Reel Rookie

Re: Tagging of unused variables - runtime consequences of use

Hi,

I have the same question. What did you find out?

Thanks! Claire

0 Kudos