|
|
|
|
|
by colejohnson66
1608 days ago
|
|
> I honestly don't care what this transpiles down to, the point for us at least is not to make things "truly private" (good luck with that in JavaScript). It's simply to compiler-enforce rules. It’s not just JavaScript. With reflection in C# and Java, you can mess around with private variables from outside the classes. For Java, this can have some pretty interesting results, such as 2+2 being equal to 5.[0] The whole point of compiler level annotations is to keep good programmers honest. If some devious JavaScript developer wants to ruin your library, that's their fault. [0]: https://codegolf.stackexchange.com/a/28818/13944 |
|