Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The biggest pain for me was that it felt like there was no good way to create a library with some internal structure in the form of packages without exposing parts of your internal implementation as public.

When Jigsaw was delayed I was playing with the idea to create a project called shitty-jigsaw, which would just merge all of the packages in a module and change the access modifiers to be more restrictive according to some module definition.



Would shading have done the job? Not to say that's a _good way_, but it _is_ a way.


Sure you can use shading to move everything you don't want in your public API into some other package, or you can use something like ProGuard to obfuscate everything but your intentional public API. However those things will still be public.

The only way to not have those things visible for the user of your library is to only use one package in your implementation.




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

Search: