Open jeanbenitez opened 3 years ago
There is a nice opportunity to allow plugins taking care of that, without necessarily adding it to the compiler formally. The idea would be to allow declaring metadata like
@expose
function say hello()
end function
Which would make it rather trivial to write a plugin for what you're describing.
I would love this. I use annotations all the time in my code (using the plugins), so this would be very welcomed
I definitely like this idea! I'm torn on whether to include it in BrighterScript or push it off to a plugin. I'll need to give this some more thought. I do like @elsassph 's idea though, if we did this, it should probably be an annotation (which don't exist yet...but might soon)
This indeed is borderline as a language feature - it needs to be thoroughly spec'd with all the edge cases. Implementing as a plugin will allow to experiment on it.
@TwitchBronBron Based on more recent chats does this seem like it more falls under the realm of component support? Or are we thinking this is something talk we would still look at doing for following the old way to make components.
Hi all! I'm relatively new reading and learning about Brighterscript language, and I like a lot this idea!
One thing I found when exposing functions is that sometimes I forgot to declare the
<function>
tag in the XML file, I know there is a runtime warning when you try to call a non-existent function in a node using callFunc, but I consider that could be a great idea to unify this in Brighterscript code, I think in something like this:Reserved word can be
expose
orexport
, I likeexpose
, but maybe someone has a better argument for usingexport
.That's it!