Regarding the idea that a keyword is an identifier that designates itself,
while a symbol is a keyword that designates something else.
Keys in config file map do not designate themselves, they designate the
corresponding map values.
{username "vasya" email "[email protected]"}
Here the EMAIL symbol designagtes "[email protected]". Moreover, one of the config file
sections allows the user to give arbitrary names to regula expressions. In
this config section the user chooses the symbols, the symbols are not
predefined in the config file format.
{3digits "\\d{3}" 2digits "\\d{2}"}
in another config section user can refer the regex by the symbols he
defined that way. So the map keys in user's definitions allow hig to give
names to values; here the names do not designate themselves, they are names
for the regular expressions.
Thinking that way, a keywords can be used as vues. For example, some
DIRECTION attribute can have one of 4 values: :up, :down, :left, :right. So
map key will be a symbol and value will be a keyword:
{speed 100 direction :up}
Note, this config file is unlikely to be used with Clojure. For users,
that's just a text document they author in an editor. The system which
parses and is configured by this file is written in Java.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/clojure/826be497-5400-472a-9959-5ad9b6a75b24%40googlegroups.com.