[Openmcl-devel] "potential numbers" as symbol names

Hamilton Link helink at sandia.gov
Wed Apr 20 12:33:34 PDT 2005


On Apr 20, 2005, at 12:45 PM, bryan o'connor wrote:

> there's also this in 2.3.1.1:
>
> "The syntax involving a leading package marker followed
> by a potential number is not well-defined. The consequences
> of the use of notation such as :1, :1/2, and :2^3 in a
> position where an expression appropriate for read is expected
> are unspecified."
>
> and then the colon-number cleanup which suggests the right
> thing is to agree to disagree on how to define it.
>   http://www.lispworks.com/documentation/HyperSpec/Issues/iss055_w.htm
>
> maybe we should issue a style warning stating that :\1 is
> preferred to (and more "well-defined" than) :1.
>

In X3J13 jargon, "not well-defined" is synonymous with "completely 
unportable" and "software devs worried about portability shouldn't do 
it, lest they be 'soundly trounced' as per Pitman's recommendation" --- 
I think in this case the onus is on KMR to treat this as a portability 
bug in cl-photo and fix it so people can load it in more systems, 
including under openmcl.

Although it isn't a terrible idea now that it has come up to have the 
openmcl reader check for this case and produce a more informative error 
message, if it's not a dramatic change to the reader's token analysis. 
(but note that even openmcl going belly-up would be a legal, if not 
particularly user-friendly, response to seeing :1, and making openmcl 
do what some other system does with :1 would just make us enablers :) )

h

>     ...bryan
>
>
> On Apr 20, 2005, at 11.34, Hamilton Link wrote:
>
>> And actually 2.3.1.1 and 2.3.1.1.1 are better references.
>>
>> http://www.lispworks.com/documentation/HyperSpec/Body/02_caa.htm
>>
>> In it is included this gem:  "If a potential number has number 
>> syntax, a number of the appropriate type is constructed and 
>> returned..."
>>
>> and 2.3.1.1.1 says that escaped characters in an otherwise potential 
>> number MUST prevent it from being a potential number, so this trick 
>> will always work.
>>
>> h
>>
>> On Apr 20, 2005, at 12:21 PM, Hamilton Link wrote:
>>
>>
>>> The token 3 is a potential number and as far as I can tell shouldn't 
>>> be a legit symbol. If the 3 is escaped, then it becomes the legit 
>>> symbol \3. In fact openmcl does accept :\3 as a keyword.
>>>
>>> See 2.3.4 "Symbols as Tokens" in the hyperspec.
>>> http://www.lispworks.com/documentation/HyperSpec/Body/02_cd.htm
>>>
>>> h
>>>
>>> On Apr 19, 2005, at 10:05 PM, bryan o'connor wrote:
>>>
>>>
>>>> kmr's new cl-photo package loses on openmcl because it
>>>> wants to use some "potential number" symbols in the
>>>> keyword package.
>>>>
>>>> ? :3
>>>> > Error in process listener(1): Reader error: Illegal symbol syntax.
>>>> > While executing: CCL::%PARSE-TOKEN
>>>>
>>>> assuming that :3 and package::3 are both valid things,
>>>> the patch below will allow them.
>>>>
>>>> i'm having problem accessing the cvs server, so this
>>>> patch is diff'd against an emacs backup file.  it might
>>>> not apply cleanly.
>>>>
>>>> thoughts?
>>>>
>>>>     ...bryan
>>>>
>>>>
>>>>
>>>> <patch.txt>
>>>> _______________________________________________
>>>> Openmcl-devel mailing list
>>>> Openmcl-devel at clozure.com
>>>> http://clozure.com/mailman/listinfo/openmcl-devel
>>>>
>>>
>>>
>>> _______________________________________________
>>> Openmcl-devel mailing list
>>> Openmcl-devel at clozure.com
>>> http://clozure.com/mailman/listinfo/openmcl-devel
>>>
>>>
>>
>>
>>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>





More information about the Openmcl-devel mailing list