Re: Private area and child packages

tmoran_at_acm.org
Date: 12/30/04

  • Next message: Warren W. Gay VE3WWG: "OT: Mach Ports (For the AdaOS folks)"
    Date: Thu, 30 Dec 2004 12:51:05 -0600
    
    

    >What I was wondering was how someone writing Some_Package can enforce
    >this on future package writers. I could obviously follow your
    >suggestion if I am the only developer writing code for a project. But,
    >if I want to hide implementation details from someone else who might
    >write a child package, I would need some mechanism to enforce this
    >information hiding.
       You could burn the only copy of the source code. Seriously, how
    else could you enforce such a restriction on future developers who
    want to fiddle with/fix your code? Even if the compiler would
    allow such a limit (say by disallowing child packages) what would
    prevent someone from simply modifying your code, say by moving the
    "hidden" declaration from the private to the public part of the spec?
    Or, if they can't modify your code, but can find a copy of the source
    somewhere, they could declare their own structure to match yours, and
    use an address clause to overlay their (visible) structure over yours.
      Part of the Ada Style is a certain humility. Assuming that your
    code and your design is so perfect that any change by anyone in the
    future is bad, is unwise, as shown by much sad experience. IMHO


  • Next message: Warren W. Gay VE3WWG: "OT: Mach Ports (For the AdaOS folks)"