On Sun, Jul 8, 2012 at 8:50 AM, David A. Wheeler <dwhee...@dwheeler.com> wrote:
>> 2.  almkglor: treat QUOTE-whitespace the same as the symbol 'quote.
>>
>> 2.1.  Pros:
>> 2.1.1.  Makes QUOTE etc. rules very very simple
>> 2.2. Cons:
>> 2.2.1.  The following syntax is no longer correct:
>>
>> ..` let
>> ......\
>> ........,var ,val
>> ......,expr
>>
>> As it gets translated to (quasiquote let (((unquote var) (unquote
>> val))) (unquote expr))
>
> ...
>> However, it could be argued that this is actually *clearer* - but we
>> do lose the vertical space, sadly.
>
> I don't like this alternative. Quote, quasiquote, and so on are really common 
> (especially quote!); creating situations where we have to have more blank 
> lines & more indentation for a common case sounds user-unfriendly.
>
> If you say:
> 'a b c
> that maps, reasonably enough, to ('a b c).
>
> But how can you quote the WHOLE list, if you already have it (a common text 
> modification)?  Creating a new line, and having to re-indent, seems painful.  
> The original SFRI had this as a special case; you can then say:
> ' a b c
> which then maps to '(a b c) which is really (quote (a b c)).
>
> Pros for '+space having a different meaning from no space:
> * Makes it easy to quote existing lists (or quasiquote, or whatever).
> * Consistent with SFRI.
>
> Cons:
> * Makes spec little longer
> * Thus, slightly more work to implement (but not much)
>
> We only need to implement this a few times, and we hope there will be a LOT 
> of code that uses it.  I think making the spec longer, but the result easier 
> to use, is worth it.  And staying consistent with the existing SFRI on this 
> point sounds like a good idea, too.

All right, let me clarify my position:

1.  ' followed directly by non-whitespace is treated the same as in
modern-expressions: 'f is (quote f)

2.  ' followed directly by whitespace is treated as the symbol quote:
' is just quote

So this:

'foo

and this:

'
..foo

are the same.

This simplifies the spec, but makes the following wrong:

' foo bar

==>

(quote foo bar)

The more complicated current spec yields:

' foo bar

==>

(quote (foo bar))

Both specs have:

'foo bar

===>

((quote foo) bar)


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