Forum Discussion

Recursion's avatar
Recursion
Newbie
5 years ago

Would there be a benefit to compiling a more traditional language such as lua to brightscript?

I find it rather silly for developers to learn an entirely new language just for roku.

So, what if I wrote a compiler for a more well known language such as lua or create a new one that is more strict and intuitive for anyone who knows similar languages?

2 Replies

  • That sounds like a promising idea, but I'm so used to BrightScript by now already.

    • sjb64's avatar
      sjb64
      Roku Guru

      The Roku language is quirky, but once you're used to it it works.  I have a laundry list of things I'd like to see added to Brightscript and the compiler, most major, a few minor, and every other developer I imagine does too.  But once you get used to the language it's not bad. 

      Adding a whole new language would probably just confuse the issue, plus backward compatibility would require both exist in the system "bios" to avoid everyone having to rewrite their channel like SceneGraph did.

      BrightScript coming from the BrightSign system, and now all the baggage that is there from millions of installed devices, probably makes that option a nightmare for Roku, even if they wanted to.

      Just for fun, some of my wishlist items...

      Switch/Case - top of the list, more readable and if coded correctly more efficient than a string of else's
      Ability to spawn threads, short lived or extended, from the code without the overhead of a task
      A cleaner (and faster) global variable system
      AA ability to hold functions (difficult I imagine) and objects (simpler) across global/field boundaries
      Ability to create objects (AA above would help there) and inherit or extend existing objects
      Better abilities for library creation and protection from changes

      etc., there are several more, the language is more the useable regardless, but to your point it is a new language to learn, which is a bit annoying.