[Laszlo-dev] How I think we want to use namespaces in the LFC

P T Withington ptw at pobox.com
Tue Feb 12 10:50:05 PST 2008


I think we want something like this:

package lfc {
   // -- need a scheme for our namespace urls
   public namespace lfc_internal = "http://www.openlaszlo.org/lps/4/lfc/internal 
";

   // Internal var
   lfc_internal var foo;

   // API var
   public var foo;

   ...
}

So, the compiler transform, I think is to put `lfc_internal` in front  
of anything that is not declared `public`.

And the user app is something like:

package user {
   import lfc.*;

   // LFC public API is accesible here
}

If we want to be Draconian, in non-debug LFC, we can make the  
lfc_internal namespace internal, which will make it inaccessible, even  
by a qualified name, but I don't think that is necessary.




More information about the Laszlo-dev mailing list