On Friday, April 25, 2014 1:32:32 PM UTC-5, Ben wrote:
>
> On Fri, Apr 25, 2014 at 11:19 AM, Alex Miller 
> <al...@puredanger.com<javascript:>
> > wrote:
>
>>
>>
>> On Friday, April 25, 2014 9:48:10 AM UTC-5, Greg D wrote:
>>>
>>> Thanks Alex and Steve,
>>>
>>> I've based a ton of work on keywords where the second character is 
>>> numeric.
>>>
>>> The http://clojure.org/readers page should be the normative reference.
>>>>
>>>
>>> The work is based on *reliance* on the definitions in the readers page. 
>>> I believe it is unambiguous in demanding a colon as the first character of 
>>> a keyword, and allowing the second character to be numeric.
>>>
>>
>> Well I'll contend it is at least ambiguous because I read it differently. 
>> :) I think everyone can agree that keywords begin with a colon. My 
>> understanding is that symbols and keywords share naming rules as a result 
>> of "Keywords are like symbols". I think the interpretation depends on 
>> whether you see the ":" as being part of the name;
>>
>
> Since the very next thing after "Keywords are like symbols" is "except: 
> They can and must begin with a colon, e.g. :fred." and the rule for 
> symbols is that they "begin with a non-numeric character", it seems 
> pretty forgivable to assume that the colon is part of the keyword (the fact 
> that it isn't stored is immaterial; if you know it's a keyword you also 
> know it starts with a colon) and that it can therefore contain numeric 
> characters immediately after the colon. "Begin" should mean "begin" in both 
> bullet points, right? 
>

It is confusing! :)  I apply "begin" to the name, not the token. What about 
auto-resolved keywords that begin with :: ? I think it is more consistent 
to apply the same rule to the name part of : and :: keywords (and ideally 
symbols). And there is no reason to define a "first character" rule if the 
first character must be ":". 

But all of this is immaterial - we currently allow keywords starting with 
numbers and seem to have decided this is ok. I would like to get Rich to 
approve a change to the page and do so.

 

>
> -- 
> Ben Wolfson
> "Human kind has used its intelligence to vary the flavour of drinks, which 
> may be sweet, aromatic, fermented or spirit-based. ... Family and social 
> life also offer numerous other occasions to consume drinks for pleasure." 
> [Larousse, "Drink" entry]
>
>  

-- 
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
--- 
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to