Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

219
Views
A private interface for classes in a module/hierarchy, like a family of classes?

I was wondering if it was at all possible to construct a family of classes which know each other's secrets but have secrets for the outside world.

Some classes could share a common interface, allowing them to call each other and be nested in arbitrary ways, but keep this interface private so that the rest of the codebase can't possibly depend on / mess with it.

Is that a thing?

The only way I can think of to make it work is to actually have only one class with some branching inside, and I don't like this idea one bit. To my knowledge, there is no way to achieve this effect via inheritance.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!