[racket] `'unquote -- error or not?

From: Richard Cleis (rcleis at mac.com)
Date: Fri Jul 8 02:46:00 EDT 2011

Ah! Forum topic morph.

I fooled with the quote stuff for years before I could pretend to understand them.

RAC

On Jul 8, 2011, at 12:38 AM, Bas Steunebrink <bas at idsia.ch> wrote:

> Of course you're right. But my original question was simply whether or not the expression `'unquote should produce an error.
> 
> Cheers,
> Bas
> 
> 
> Op 8-7-2011 5:52, Richard Cleis schreef:
>> I don't get it.  The quotes are conveniences.  If they are not convenient, why can't you merely list what you want?
>> 
>> (list '... ''unquote '...)
>> 
>> rac
>> 
>> On Jul 7, 2011, at 8:33 AM, Bas Steunebrink wrote:
>> 
>>> Thanks for the fast answers!
>>> Actually I wanted to get 'unquote inside of a quasiquote; I'm now using:
>>> `(... ,''unquote ...)
>>> It ain't pretty but it appears to do the job! :-)
>>> 
>>> Bas
>>> 
>>> 
>>> On 7/7/11 16:20 PM, Robby Findler wrote:
>>>> FWIW, I'm right in line with this rationale.
>>>> 
>>>> Robby
>>>> 
>>>> On Thu, Jul 7, 2011 at 9:13 AM, Matthias Felleisen<matthias at ccs.neu.edu>   wrote:
>>>>> On Jul 7, 2011, at 10:01 AM, Bas Steunebrink wrote:
>>>>> 
>>>>>> Ciao a tutti,
>>>>>> 
>>>>>> When I type `'unquote in DrRacket, an error is thrown:
>>>>>> 
>>>>>>> `'unquote
>>>>>> (X) unquote: expects exactly one expression in: (unquote)
>>>>>> 
>>>>>> I understand why this error occurs from the way quasiquote is expanded; see e.g. http://community.schemewiki.org/?scheme-faq-language#qqmacro (I guess DrRacket works similarly). Still, I feel the result should be just 'unquote. What do you think?
>>>>> No, your use of backquote explicitly calls for a search for unquote.
>>>>> 
>>>>> If you want the symbol unquote inside of an unquote, you first need to unquote:
>>>>> 
>>>>>> `,'unquote
>>>>> unquote
>>>>> 
>>>>> (as in comma = unquote).
>>>>> _________________________________________________
>>>>>  For list-related administrative tasks:
>>>>>  http://lists.racket-lang.org/listinfo/users
>>>>> 
>>> _________________________________________________
>>> For list-related administrative tasks:
>>> http://lists.racket-lang.org/listinfo/users


Posted on the users mailing list.