Lots of comments seen to have missed that the article isn't recommending against private fields, only the private keyword.
Typescript and JavaScript have a newer brand # to make fields private. The native feature will have runtime benefits while the private keyword creates fields that's are public at runtime.
I still use the private keyword because constructor shorthand doesn't support brands.
Typescript and JavaScript have a newer brand # to make fields private. The native feature will have runtime benefits while the private keyword creates fields that's are public at runtime.
I still use the private keyword because constructor shorthand doesn't support brands.