You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Javascript has private class fields now... and compilers are able to downgrade it to using WeakMap if necessary.
I think public/private should be discouraged over the native approach. typescripts private keyword is only soft private and don't really protect anything. another thing is that compilers can mangle those hard private # names into 1-2 letter words when minifying
another thing could be to discourage class fields that starts with _ and warn/suggest to use # instead (for both js and ts)
...anything that have the keyword public is just bloated annotation, it's really just more simpler than that, everything that isn't private is public, why be so explicit?
The text was updated successfully, but these errors were encountered:
Javascript has private class fields now... and compilers are able to downgrade it to using
WeakMap
if necessary.I think public/private should be discouraged over the native approach. typescripts private keyword is only soft private and don't really protect anything. another thing is that compilers can mangle those hard private
#
names into 1-2 letter words when minifyinganother thing could be to discourage class fields that starts with
_
and warn/suggest to use#
instead (for both js and ts)...anything that have the keyword
public
is just bloated annotation, it's really just more simpler than that, everything that isn't private is public, why be so explicit?The text was updated successfully, but these errors were encountered: