Disallow JavaScript statement at the root of strong mode scope
"use strong";
function alert(text) { /* ... */ }
alert("Hi!"); // can be forbidden will make some strong mode features easier to implement
// but what will initiate you code ?
In a language that I will be implementing and planning to target strong mode in it I will only allow classes, constant values and function declarations at the `root` scope of the build single file
My first goal was to avoid dependency issues inside the code, thing that I experienced with early TypeScript single file outputs unless I took declarative approach.
In that language I have a sort of manifest format that tells me the main file in the project and if a `main` function is defined in that file it is called at the end of my project's single bundle.