@RokuKC -
I let this steep in my head for a while. It's a curious and quite challenging issue. Challenging, because you have to preserve the behavior of big warehouse of existing apps, while replacing some of the plumbing/foundations underneath. RokuCo has done it before, e.g. the
type changes in BrightScript3 ^. It's ungrateful job - last year i was thinking how it's easier on the developers of native libraries (on the example of Marmalade SDK), since these get bundled with the binary and later version change will only affect future builds of the app - unlike with upstream interpreter or "magic libraries"^^ like RAF which can suddenly and mindlessly "pull the rug from under" the app.
Libraries! Your point of view is interesting - i never thought about protecting library from interference by the client code. But IMHO even more important is the other direction - protect app code from getting screwed by library symbols.
Here is an example of such screw-up:
viewtopic.php?f=34&t=75717 - what happened is that in a firmware update, a library suddenly defined a function already defined/used by the app and thus killed the channel! "SUB or FUNCTION defined twice. (compile error &had)" - that is a hard error with no way out of it, it leaves a published channel dead in the water. Back then, the specific issue was band-aided by prefixing all functions inside "v30/bslDefender.brs" to start with "df"
Like i pointed then, it's safer for the Co to add a new function to ifGlobal than to a "magic library", since paradoxically the latter may kill working apps. So i think some scoping for "Library" is in order - i.e. all functions inside included library get resolved to that context only and won't see later defined user symbols (that's to address your concern) and re-definition only causes warning and no fatal error. I'd love to be more constructive but you have removed viewing pcode from the console <dirty-look/>...
(^) i might be the only person outside the Co to know there being 6 different internal types of strings in B/S, as exemplified by "a", box("a"), "a"+"b", ["a"][0], ["a"+"b"][0], [box("a")][0]. Seems like a tetanic effort for little payoff. Still, i am in awe.
(^^) by "magic libraries" i mean libraries that may magically update/change themselves beyond developer's control. Which is what, in B/S i think everything included using the "Library" statement?