[plt-scheme] here-string

From: Felix Klock's PLT scheme proxy (pltscheme at pnkfx.org)
Date: Sat Mar 6 13:25:02 EST 2004

On Mar 6, 2004, at 1:14 PM, Bruce Hauman wrote:

> OK lets look at bar delimited symbols then. I just read about this.
> (display
>  (symbol->string
> '|alias modemup='su -c "ifdown eth0;wvdial &"'
> alias modemdown='su -c "killall wvdial;ifup eth0"'|))
> =>
> alias modemup='su -c "ifdown eth0;wvdial &"'
> alias modemdown='su -c "killall wvdial;ifup eth0"'
> -- Bruce

That's a pretty clever use of the bar delimited symbols.  It'll 
probably cover 99.9% of the cases I care about (I don't know about 

The real problem with it, though, is that you now cannot put bars into 
your strings.  This is the genius of here-strings: you choose your own 
delimiter, so the language doesn't impose any constraints on the 
content of the string.  Its always WYSIWYG, as long as you choose the 
right delimiter at the outset.

David: my first message on this topic had a link to a page that had 
some code for reading here-strings on it.  Could you perhaps get by by 
writing your own reader that used that code, and then dispatching to a 
read-eval-print-loop that was parameterized over that new reader?


"at this point, i'm ready to
  join the javadoc dev team"  -josh

Posted on the users mailing list.