On Mon, Jul 9, 2012 at 3:17 AM, David A. Wheeler <dwhee...@dwheeler.com> wrote:
> I think we need to seriously discuss all the splicing/grouping/etc. stuff.  
> Those decisions will affect everything else, and there are complex 
> trade-offs.  One challenge is that practically any character or character 
> pair seems to be already used by someone.
>
>
>> proposal 3:
>>
>> 3.  . = SPLICE = GROUP, remove SPLICE-at-the-eol rule (this helps
>> justify removing the SPLICE-at-the-eol: since \ at the eol has an
>> existing meaning in other languages, we avoid it.  Incidentally, "."
>> has a meaning in general western written languages: it ends sentences.
>>  So we could justify using it to mean "end the expression so far and
>> start a new expression", which is one interpretation of the
>> SPLICE-inline rule.)
>
> Claiming "." as the "end of expression" is an interesting idea, but I don't 
> think it is a good idea for Lisps.  The problem is that "." already has a 
> (very old) meaning; it precedes the cdr of a pair. E.G., (a . b).  In cases 
> where it makes sense, it'd be wise for the same operator to have the same 
> meaning, or it's pretty confusing.
>
> I would expect during indentation processing that:
> a . b
> would mean the same as:
> (a . b)
>
> Thus, I don't think the following works well:
>> foo
>>   :foo-stuff . exp1()
>>   :bar-stuff . call the function
> because I think a reader would expect this to mean:
> (foo (:foo-stuff . (exp1)) (:bar-stuff . call...))
>
> I don't know of a Lisp spec that defines (. stuff), but interestingly, in 
> practice, that usually evaluates (in the reader) as just "stuff" because of 
> the way that the Lisp readers are interpreted.  I'm fine with mandating that, 
> if that helps; it creates an escape we can use.
>
> So I don't like the idea of "." as "splice"; I think it's too confusing.

Okay, so what symbol should we use as splice/group?  Candidates

\ = often means "continue on next line" when at eol in other languages
. = means dotted pair in normal Lisps
@ = could conflict with (!!) autoconf-standard replacement (and
de-facto standard when replacing autodetected stuff into files),
conflicts with Guile 2.0 module-access syntax
~ = mostly unused except in Arc, where ~foo means "the function foo
with its output notted" and ~ means "the not function"; otherwise
valid function name
^ = otherwise valid function name (superscript?  even infix
exponentiation or XOR operator: {a ^ b})


>
>> let
>>   .
>>     a b
>>     c d
>>   e
>
> This one doesn't look bad; claiming that "." on a line by itself as a special 
> case seems plausible.  I'm still worried that "." is too hard to see, but it 
> *is* plausible as a "group" marker.

Yes, but particular specifications of SPLICE make SPLICE-by-itself act
in the same manner as a "group" marker like the above - so I'd rather
merge their meanings to reduce the number of special syntaxes that we
need to spec out.

In short, SPLICE-by-itself should just "drop out" of the rules for
SPLICE-inline and SPLICE-at-the-start.

Sincerely,
AmkG

------------------------------------------------------------------------------
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