Hacker News new | past | comments | ask | show | jobs | submit login

I gave a lightning presentation on this subject last month. A better solution is to put the private methods into (sub)modules. This makes them public to the file system and gives you the ability to tune what you make public via your module API. Ideal for testing purposes and good for module structure in my opinion. The slides can be found here: https://speakerdeck.com/qubyte/writing-testable-private-meth...

P.S. see option 3 in that presentation.

Applications are open for YC Winter 2021

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact