I said:
> > But with this pair, perhaps you could do:
> > let <* myvar calculate(init) *>
> > ! ...
> 

Alan Manuel Gloria:
> For this behavior, what would the specifications exactly be?

First cut at semantics:
<* ... *> are like ( ... ) in that they surround a list, but they do NOT turn 
off indentation processing.  A "<*" resets the "indent" level to a 0-length 
string, skips all horizontal whitespace, and then restarts reading an 
expression with indentation processing still live.  A blank line inside <* ... 
*> ends an expression WITHIN the <* ... *>, but stays within <* ... *>; only 
eof or active *> can close the <*.  Once all that mapping is done, the range of 
<* ... *> is replaced with the mapped result.

Example 1:
<*

a b c

d e f
g h i
*>

In this example, the <* starts a list.  It consumes the non-existent horizontal 
whitespace, then begins expression processing.  The next two newlines are 
before an expression, and thus ignored.  The "a b c" is an expression, with 
indentation processing active, leading to (a b c).  It ends with a blank line.  
The "d e f" maps to (d e f), and "g h i" maps to (g h i), but they're stuck 
within the <* ... *> range.  The whole thing maps to:
((a b c) (d e f) (g h i))

Example 2:
foo <*
a b c
d e f
*>
maps to:
(foo ((a b c) (d e f)))

Example 3:
let <* var1 init(me) *>
!  body
maps to:
(let ((var1 (init me)))
  body)

Of course, I may have made a mistake here, and these might not be the best 
semantics.  Thoughts?

--- David A. Wheeler

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to