As already mentioned, this is a practice among many developers, bad at that. If you resort to such conventions in your programming methods, you should learn the language, methods, and patterns before attempting to use the language. If someone cannot distinguish between public / private methods in your code without using underscores, then your documentation skills are sorely lacking. Many public projects on the Internet are very poorly documented, which is probably due to the fact that the “underlining” agreements were “accepted” by most of the educated developers, while others decided to go with the flow, rather than stick to formal templates and design methods. There is a reason why the underscore was not written in ES6 / 7.
In a blog post I recently stumbled upon the Software Developer Manager, who stated: "The underscore naming convention makes it very easy to say, on the one hand, whether the variable function should be public or private." My answer: "Comments are like pictures, in which case they cost thousands of underscores.
There is a free documentation tool called Doxygen. Although it does not support JavaScript, it can create professional documentation for your JavaScript applications when you use the Doxygen prefix in your comments. It is very simple to create JavaScript applications with documentation, both for developers and users, when you put a little effort into the comments of the codes.
Remember that there are tools that can remove comments, and console instructions for Production Releases. Using source maps is a waste of time and resources. Do not reduce until you are ready to publish .. ie Dev Build (without miniaturization, comments and console statements), Release Build (remove comments and console instructions and minimize Dev build. There is no need to recompile Dev Build when it releases high-quality code, just prepare it for release and expand it).
BeosFreak Jan 10 '16 at 15:30 2016-01-10 15:30
source share