When you need to reuse code between projects, or make some portion of code private and let other parts be public.