-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keywords instead of symbols? #1
Comments
Hi Dmitri, thanks for the interest and the question... I came from a CommonLisp background, over there keywords are in the keyword namespace unlike Clojure keywords. It was just natural to make them this way. (also less typing ;) In Clojure I guess there's no reason they couldn't be, they have a namespace and a name which is what's really needed. There are a few places where keywords matter, and have specific meaning in the library, for example things like With keywords it would be a little easier to control empty namespace things, so you could have Right now I'm reasonably happy to use symbols and have special namespaces including As a side note, it just looks at sequences so vectors or lists should be just fine (although I don't know if there are tests for this, I should add some). thanks, |
Oops! Sorry for such a late response! Of course, keywords vs. symbols problem doesn't really affects the functionality or something like that; it's mostly about how the API feels. In clojure, symbols are used much less frequently than in CL. Generally, only macros work with them, so you rarely have to quote something before passing in function (standalone use, require and import are an annoying exception to the rule). The same with vectors: since you have literal vector, why use quoted list? Another thing is that every symbol creates unique object under the hood (while keywords use pool), thus it's pretty heavyweight compared to keywords (although it's hardly matters in this case). Anyway, it's just a minor style thing, so if changing it would require additional work then it doesn't worth the time spent. |
Hello,
it's not really an "issue" - I'm just wondering is there a reason to use symbols as elements of triplets? In clojure, keywords usually used in such cases:
[:ex/KevinL :foaf/name "Kevin Livingston"]
.Thanks for your work and good luck with the new library!
The text was updated successfully, but these errors were encountered: