It is my experience that the way how these fundamental Clojure entities, like 
Strings, Symbols, Keywords, Vars, NS, and Type/Class, are related, is not so 
easy to figure out. This is not so much about programming Clojure, but more 
about getting a better feel how the language is held together one level below.

I've created this graph that visually shows what core-functions will give you a 
var from a symb, a str from a ns, etc.:

"https://github.com/franks42/kitjensink/wiki/Symbs,-Vars,-NSs,-and-such";

It's still work in progress, but compiling the info for this picture was 
already very therapeutic and enlightning.

Any comments or suggestions how to improve are most welcome.

---

One part that added to my confusion about how these different types are 
related, is the fact that the function signature and documentation is sometimes 
unclear and feels inconsistent. For example, different functions/macros let you 
pass a namespace as a string, a symbol-name, a quoted-symbol or a ns-instance, 
or some (arbitrary) combination. Sometimes a "name" refers to a symbol, 
sometimes a string, both in docs and in implementation… I often find myself 
getting exceptions thrown because I know a ns is expected, but I "guessed" 
wrongly about which type of ns-identifier that particular function demanded. 
Is that a common experience? 
Is that "by design"? (not being facetious - sometimes you want to throw 
exceptions if the wrong type is presented, or implementing all possible 
function signatures that would support an ns passed as string/symbol/instance 
simply adds too much additional testing).

Regards, FrankS.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to