Sunday, May 22, 2005

restricting scope: the local classifier

In general, if X has a Y, then Y is visible for all children and other decendents of X. Further, Y is visible to any item which imports X.

The exception now is Remarks. If X has a Remark, R, then R is visible only to X and to Remarks on X. By default, you could say that Remarks are local.

Lets say we want a Drawer to be local. Then it would not be visible when the Cabinet it is in is imported--in all other cases, normal visibility rules would apply.

There is a granularity ordering of items: Ark, Cabinet, Drawer, Folder, Page, Ledger and Remark. It makes no sense to talk about local Arks and Cabinets, and we've already looked at Drawer and Remark. Lets consider a local Page...

A local Page will not be visible when the container it is in (Folder, Drawer, Cabinet) is imported. A local Page will be visible to the Pages, Ledgers and Remarks that are in the same container. But a local Page in a Drawer will not be visible to the Folders in that Drawer.

Now marking a ledger as local is likely much more helpful than saying that nested LedgerEntries are local. But perhaps we could mark Remarks and nested LedgerEntries as local by default.

0 Comments:

Post a Comment

<< Home