Re: characters permitted in symbols??
On 2010 Apr 1, at 12:56 PM, Stuart Halloway wrote: I think you are reading this backwards. Nothing will be removed from the list, things won't become more limiting. The lack of guarantee is around the addition of new features. :) Clojure is remarkably stable. The ecosystem of libraries around it is, of course, another story. :-) Yup, no dispute there. I think I'll stick to using what works even if not officially sanctioned, with the belief that clojure will 'do the right thing' and not take away symbol characters without: a) very very good reason and b) prominent notice of the new functionality of the off-limits-to- symbols characters in the release notes. Clojure will not take away any of the documented symbol characters. The question is: *when* will it be safe to add more? I had hoped that the http://clojure.org/reader was just out of date. I can't seem to find a "roadmap" link from the front page or the FAQ, I don't know what changes might yet be planned. I'm guessing, from the goals of Clojure, that there probably aren't many reader related changes in the works. I'm going to use things that work even if they aren't documented as guaranteed, because I can't imagine special meanings being added without them being documented/announced; at that point, I can decide to change my code or not upgrade. -Doug -- 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 To unsubscribe, reply using "remove me" as the subject.
Re: characters permitted in symbols??
On 2010 Apr 2, at 8:06 AM, Rich Hickey wrote: On Apr 1, 2010, at 7:37 AM, Konrad Hinsen wrote: - Two characters, . and /, are treated specially even though this is not or not clearly stated in the documnentation. Better don't use those in unqualified symbols. Hmm. There are two sentences in http://clojure.org/reader that begin " '/' has special meaning" and " '.' has special meaning" respectively. Is that not enough? As the OP, that was clear to me. I know not to try to use miles/gallon as a simple symbol. In my (old) Common Lisp code, I had two kinds of symbols that used '>' characters: foo->bar >bar The first was a simple foo to bar converter, the second was multimethod for converting many different kinds of things to a bar. -Doug -- 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
Re: characters permitted in symbols??
On Apr 1, 2010, at 7:37 AM, Konrad Hinsen wrote: On 1 Apr 2010, at 13:04, Meikel Brandmeyer wrote: Clojure being still young and in flux at certain areas doesn't contradict a currently valid, authoritative documentation. It may be that the list for allowed characters in a symbol is extended at some point in time. However this does not mean that the current list is not authoritative now, but only that at that point in time it will be replaced with a new list which is just as authoritative from then on. Then it just remains to be defined what "authoritative" means - and we are on the best way to a philosophical discussion list, rather than one on Clojure programming. From a pragmatic point of view, I'd summarize the situation as follows: - The Clojure documentation lists which characters can be used in symbols. If you care about long-term portability, you'd best stick to those, though no one will sign a contract guaranteeing this list forever. - Many additional characters work fine in all Clojure releases until now, but no promise is made for the future. These characters include some punctuation and most of non-ASCII Unicode. - A small subset of these additional characters (mostly punctuation) are used in clojure.core. Given that clojure.core has no special status from an implementation point of view, it is reasonable to expect that the same characters can safely be used elsewhere, but that's an extrapolation. - Two characters, . and /, are treated specially even though this is not or not clearly stated in the documnentation. Better don't use those in unqualified symbols. Hmm. There are two sentences in http://clojure.org/reader that begin " '/' has special meaning" and " '.' has special meaning" respectively. Is that not enough? Rich -- 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 To unsubscribe, reply using "remove me" as the subject.
Re: characters permitted in symbols??
From a pragmatic point of view, I'd summarize the situation as follows: - The Clojure documentation lists which characters can be used in symbols. If you care about long-term portability, you'd best stick to those, though no one will sign a contract guaranteeing this list forever. Given how young the language is, I don't find that particularly reassuring. I think you are reading this backwards. Nothing will be removed from the list, things won't become more limiting. The lack of guarantee is around the addition of new features. Clojure is remarkably stable. The ecosystem of libraries around it is, of course, another story. :-) I think I'll stick to using what works even if not officially sanctioned, with the belief that clojure will 'do the right thing' and not take away symbol characters without: a) very very good reason and b) prominent notice of the new functionality of the off-limits-to- symbols characters in the release notes. Clojure will not take away any of the documented symbol characters. Stu -- 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 To unsubscribe, reply using "remove me" as the subject.
Re: characters permitted in symbols??
From a pragmatic point of view, I'd summarize the situation as follows: - The Clojure documentation lists which characters can be used in symbols. If you care about long-term portability, you'd best stick to those, though no one will sign a contract guaranteeing this list forever. Given how young the language is, I don't find that particularly reassuring. - Two characters, . and /, are treated specially even though this is not or not clearly stated in the documnentation. Better don't use those in unqualified symbols. Clearly enough in http://clojure.org/reader to know to avoid them as generic symbol characters. - Two symbols, ns and in-ns, are treated specially in var lookups. They will always resolve to their meanings in clojure.core, even if defined differently in some other namespace. This is not documented and may be a temporary feature of the current documentation. Didn't realize that, good to know. Thanks to Meikel and Per as well for their comments. I think I'll stick to using what works even if not officially sanctioned, with the belief that clojure will 'do the right thing' and not take away symbol characters without: a) very very good reason and b) prominent notice of the new functionality of the off-limits-to- symbols characters in the release notes. --Doug -- 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 To unsubscribe, reply using "remove me" as the subject.
Re: characters permitted in symbols??
On 1 Apr 2010, at 13:04, Meikel Brandmeyer wrote: Clojure being still young and in flux at certain areas doesn't contradict a currently valid, authoritative documentation. It may be that the list for allowed characters in a symbol is extended at some point in time. However this does not mean that the current list is not authoritative now, but only that at that point in time it will be replaced with a new list which is just as authoritative from then on. Then it just remains to be defined what "authoritative" means - and we are on the best way to a philosophical discussion list, rather than one on Clojure programming. From a pragmatic point of view, I'd summarize the situation as follows: - The Clojure documentation lists which characters can be used in symbols. If you care about long-term portability, you'd best stick to those, though no one will sign a contract guaranteeing this list forever. - Many additional characters work fine in all Clojure releases until now, but no promise is made for the future. These characters include some punctuation and most of non-ASCII Unicode. - A small subset of these additional characters (mostly punctuation) are used in clojure.core. Given that clojure.core has no special status from an implementation point of view, it is reasonable to expect that the same characters can safely be used elsewhere, but that's an extrapolation. - Two characters, . and /, are treated specially even though this is not or not clearly stated in the documnentation. Better don't use those in unqualified symbols. - Two symbols, ns and in-ns, are treated specially in var lookups. They will always resolve to their meanings in clojure.core, even if defined differently in some other namespace. This is not documented and may be a temporary feature of the current documentation. Konrad. -- 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
Re: characters permitted in symbols??
Hi, On Apr 1, 11:10 am, Per Vognsen wrote: > Unless you want to argue that core is magical, I don't see how you > could possibly maintain that claim of consistency. As I said: exceptions in core are disputable, eg. /, ns, etc. Clojure being still young and in flux at certain areas doesn't contradict a currently valid, authoritative documentation. It may be that the list for allowed characters in a symbol is extended at some point in time. However this does not mean that the current list is not authoritative now, but only that at that point in time it will be replaced with a new list which is just as authoritative from then on. Hypothetically: the list could stay as it is now and in core things are renamed to le, eq and divide. Unlikely but possible. I don't think, that fluxiness of a project does invalidate documentation. In particular when the project leader referred several times to the existing documentation as authoritative. Sincerely Meikel -- 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 To unsubscribe, reply using "remove me" as the subject.
Re: characters permitted in symbols??
Unless you want to argue that core is magical, I don't see how you could possibly maintain that claim of consistency. It is perfectly understandable that the documentation in this and other areas may sometimes be lacking and lagging with Rich's focus on forging ahead. Keeping that in mind, it is very strange to me that you would suggest treating it as authoritative for the sake of writing code. A more realistic answer would be that much about Clojure is still in flux and that you shouldn't count too strongly on things staying the same, even if it's in the documentation. -Per On Thu, Apr 1, 2010 at 4:02 PM, Meikel Brandmeyer wrote: > Hi, > > On Apr 1, 10:42 am, Per Vognsen wrote: > >> Are you serious? It is neither complete nor consistent. How can it be >> authoritative? > > The list is by definition complete and consistent. Use characters not > in the list and your programs might suddenly break. Exceptions in core > (<, =, /, ...) might be disputable but do not change things for user > programs. > > Sincerely > Meikel > > -- > 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 > > To unsubscribe, reply using "remove me" as the subject. > -- 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
Re: characters permitted in symbols??
Hi, On Apr 1, 10:42 am, Per Vognsen wrote: > Are you serious? It is neither complete nor consistent. How can it be > authoritative? The list is by definition complete and consistent. Use characters not in the list and your programs might suddenly break. Exceptions in core (<, =, /, ...) might be disputable but do not change things for user programs. Sincerely Meikel -- 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 To unsubscribe, reply using "remove me" as the subject.
Re: characters permitted in symbols??
On Thu, Apr 1, 2010 at 12:29 PM, Meikel Brandmeyer wrote: > Hi, > > On Apr 1, 6:58 am, Douglas Philips wrote: > >> According to:http://clojure.org/reader >> Symbols begin with a non-numeric character and can contain >> alphanumeric characters and *, +, !, -, _, and ? (other characters >> will be allowed eventually, but not all macro characters have been >> determined). ... >> >> It seems that '>' is permitted in 1.1, as: >> user=> (def foo->bar 3) >> #'user/foo->bar >> >> Does that work by "accident" (or by undocumented permissiveness)? >> Is there someplace else that I should for an answer to this? > > The documentation is authoritative. Are you serious? It is neither complete nor consistent. How can it be authoritative? -Per -- 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 To unsubscribe, reply using "remove me" as the subject.
Re: characters permitted in symbols??
Hi, On Apr 1, 6:58 am, Douglas Philips wrote: > According to:http://clojure.org/reader > Symbols begin with a non-numeric character and can contain > alphanumeric characters and *, +, !, -, _, and ? (other characters > will be allowed eventually, but not all macro characters have been > determined). ... > > It seems that '>' is permitted in 1.1, as: > user=> (def foo->bar 3) > #'user/foo->bar > > Does that work by "accident" (or by undocumented permissiveness)? > Is there someplace else that I should for an answer to this? The documentation is authoritative. Not enforcing the rules does not mean that the rules are invalid. So to be safe one should stick with the documentation. However I think characters like <, > or = should also be in the allowed list. It should probably be revised. Sincerely Meikel -- 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 To unsubscribe, reply using "remove me" as the subject.