...
- What is the syntax for tags?
- Keywords, like
#:tag form- One character longer
- Slightly easier to parse
- Symbols, like
#tag form- One character shorter
- Slightly harder to parse
- Ambiguous with record constructors?
- Not if we assume that:
- 1) record names always contain a dot
- Which they must, because deftypes occur in namespaces
- 2) user-defined tags are always namespace-qualified
- 3) built-in tags do not contain a dot
- 1) record names always contain a dot
- Not if we assume that:
- Keywords, like
- What happens when the reader encounters a tag for which no function is defined?
- Error?
- Return form unchanged?
- Return form with extra metadata?
- Only possible if form supports metadata, ignore otherwise?
- How to associate tags with reader functions?
- file containing mapping from tags to Vars
- "magic" file name gets loaded before other files
- doesn't load any code directly
- If 2 JARs on classpath have a magic file, who wins?
- map stored in dynamic var
- thread-local binding for each source file
- created in
Compiler.load
- created in
- can be set! within a source file
- can be rebound when invoking the reader at runtime
- thread-local binding for each source file
- file containing mapping from tags to Vars