3 ms·
I really hate private, protected, sealed and such. At least few times I found myself in situation that I needed to use some library in ways author haven't antic
by scotty79 11y ago
I really hate private, protected, sealed and such. At least few times I found myself in situation that I needed to use some library in ways author haven't anticipated or create workaround for a bug there.
I had to recompile it and duplicate large parts of the library code just because somebody put private, protected or sealed for no apparent reason in few places.
In JS keeping classes only as local variables not exposed in any way to user of the library has the same effect. Please don't do it. If you want me not to shoot myself in the foot then create good api, not just try to hide the gun in the closet. I'll find it anyway and the more time I spend looking for it, the less time I'll have to understand how to operate it safely.