Hello,
I have a question about the best way to do namespace traversal in quixote.
Sorry for the contrived example, but I think this best illustrates the
point.
Say I have an app that needs to map a URL
/numbers//
For example,
/numbers/15/binary would return '1111'
/numbers/15/octal would return '017'
/numbers/15/decimal would return '15'
/numbers/15/hexadecimal would return '0xf'
/numbers is a module, and the namespace is introduced by
import numbers
// is best mapped to a _q_lookup function.
How are the // best handled, though?
_q_lookup seems wrong considering there are only limited options.
An imported module seems like overkill.
I would suggest a class, but I don't see any provision to instantiate a
class before traversal (except through _q_lookup), and You wouldn't want
classes just hanging around in case they might be called.
_q_exports only seem to work for terminal parts of the url, not for the
definition of the proximate namespace.
Clarifications? Is there something I am missing?
Thanks,
VanL