Hi,

I am starting to get pretty serious about using Rhino as a general
purpose server-side language, and one of the main issues that I still
need to solve is package/namespace management. I strongly suspect that
someone has developed a solution to this already, but if not then I
will be trying to figure something out. The characteristics that will
be needed are as follows:

1. Code in a given file needs to enter the global namespace only when
explicitly specified (presumably it needs to occupy its own scope?)
2. A package/namespace needs to be able to export functions that can
be imported and invoked from other packages
3. Ideally, the namespaces would be organized hierarchically so that
one could import foo.bar.* and receive the entire contents of the
package and any packages deeper in the hierarchy
4. Some mapping to actual files on the disk is of course called for,
as well as a way to load them into the process

In short, I need equivalent functionality to the Perl/Python/Ruby
family of dynamic languages (as these are the languages I hope to
replace with Rhino). I have some idea of how I would go about writing
such a facility, but given that this need has likely been felt before
I thought I would solicit any existing solution (or at least advice
about how to do it).

Has anybody seen or written anything like this? It seems like it might
make a lot of sense for Rhino to offer functionality like this out of
the box.

Thanks,
Ben Reesman
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to