- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Tagging of unused variables - runtime consequences of use
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
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.".
Ultra 4850 | Ultra 4800 | Streaming Stick 4K+ 3821 | TCL Roku TV 43S245/C107X
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Tagging of unused variables - runtime consequences of use
Hi,
I have the same question. What did you find out?
Thanks! Claire