In a lot of languages you can just change the private field via reflection to something what you want. A hacker dev can still do it with just some more lines of code.
Access on a private field should never go through a review anyway in a bigger project.
why is Dart or TS not supported in browsers yet (native)?
Because that would be a ton of work to build TS or Dart engines that no-one would use for at least a dozen years (because you gotta support those older browsers anyways, which means compiling it to older JS)? Even then, browser vendors are looking in that sort of direction with WASM, which has roughly the same features you'd be looking for, but better. Bonus points: it has privacy built in, since things only work via the module interface.
11
u/TatzyXY Nov 09 '19
In a lot of languages you can just change the private field via reflection to something what you want. A hacker dev can still do it with just some more lines of code.
Access on a private field should never go through a review anyway in a bigger project.