On Fri, Feb 1, 2013 at 9:47 AM, Terry Raymond <traymond@craftedsmalltalk.com> wrote:

I constantly run into the situation where I am incorporating either HTML or javascript

in my methods. The problem I run into is the smalltalk string quote(�). It is a real pain

to double quote it, and don�t even try to copy and paste external javascript.

So, I think it would be real helpful to have some other funky string quote like

##{{ }}## or some sequence that is very unlikely to occur in another language.

Has anyone done this or even thought about it?


David Leibs has been pushing a well-thought-through facility he calls (and other systems name) "quasi-quote". �Here, a string literal contains escape sequences, a little like printf, that allow one to substitute values. �Dave's syntax uses square brackets to escape into Smalltalk. �So that (IIRC) you say things like

� � '<html><head></head><body><H1>[myHeading]</H1>'

which compiles to something analogous to

� � String streamContents: [:s| s nextPutAll:�'<html><head></head><body><H1>'; nextPutAll: myHeading asString; nextPutAll: '</H1>]

But this excellent suggestion has fallen on deaf ears (my own included) for more than a decade.

Terry

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI� 02878

(401) 624-4517����� traymond@craftedsmalltalk.com

===========================================================


_______________________________________________
vwnc mailing list
vwnc@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc




--
best,
Eliot