This looks good. I can sympathize with the concern, and with the process of developing a way to visualize these relationships. I created this last year, an experimental interactive visualization of Clojure and its standard library:
http://www.clojureatlas.com Here's a direct guest link focused on `name`, which is a relevant jumping-off point given your interest here: http://www.clojureatlas.com/org.clojure:clojure:1.2.0?guest=Y#clojure.core/name (Hint: hold down option/alt while hovering over nodes to get their info bubbles to show up without clicking on them or their `i` icons.) FYI, the Atlas is Clojure 1.2-only still. Now that the book is done, I'm (finally) getting back to it and am in the process of building out the 1.3 ontology and reworking the visualization itself a fair bit. I hope you find this useful / interesting. Cheers, - Chas On Mar 1, 2012, at 7:14 PM, Frank Siebenlist wrote: > 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 [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 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
