[plt-scheme] Is this possible with at-exp ?

From: Jaime Vargas (jev at mac.com)
Date: Thu Jun 25 16:07:19 EDT 2009

On Jun 25, 2009, at 3:38 PM, Eli Barzilay wrote:

> On Jun 25, Jaime Vargas wrote:
>> I would like to use the at-exp reader when coding system calls. Is
>> there a form with similar behavior to @op[args] that transform every
>> argument into a string?
>> @system*[/usr/bin/ssh -o BatchMode=yes
>>                       -o LogLevel=ERROR
>>                       -o StrictHostKeyChecking=no
>>                       -- @host @commands]
> I'm not sure what you're trying to achievem but if you're not using
> text arguments, then there's no point in using the `at-exp' language.

I am  tying to avoid string-append and typing every string. I thing  
the above reads better than the alternatives:

(system (string-append "/usr/bin/ssh -o BatchMode=yes -o  
LogLevel=ERROR -o StrictHostKeyChecking=no -- " host " " commands))

(system* "/usr/bin/ssh" "-o" "BacthMode=yes" "-o" "LogLevel=ERROR" "- 
o" "StrictHostKeyChecking=no" "--" host commands)

I thought that maybe I could leverage `at-exp' language to accomplish  
this "special syntax." If `at-exp' doesn't help, how to implement  
this? Is it possible to extend `at-exp' to handle this case?



Posted on the users mailing list.