Re: private include files

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Wed, 13 Oct 2004 08:06:31 +0200, Juergen Luethje <j.lue at gmx.de>
wrote:

>It will be confusing anyway, because there is no "private procedure", or
>"private object". E.g. Hayden McKey is already confused, _before_ this
>feature is actually implemented.

That's a very interesting point.

The problems we are discussing here are not really about "hiding" a
global the author /intended/ to make publicly available, but about not
exposing things the author needed to make visible throughout all the
code of the library component, but "global" unintentionally makes them
visible externally.

Forgetting what has been said about 'global include' and 'private
include' for a moment, try this on for size:

A private procedure or object would be visible inside sub-includes,
similar to global variable handling, but would be removed from the
symbol table at the end of the file that defined it, which is more
like local variable handling.

The sneaky bit is that when a file is "privately included", then these
private variables do NOT disappear, but become visible until the end
of the including file. Package-level, if you like.

Regards
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu