On Thu, Jul 19, 2012 at 12:12 AM, David A. Wheeler
<dwhee...@dwheeler.com> wrote:
> Alan Manuel Gloria:
>> 4. I can't accept #4 because I'm not assured that it is easy to
>> implement given a one-character lookahead implementation (Scheme).  I
>> think that it is a significant implementation burden, in order to
>> support what I consider to be minor advantages.
>
> I just posted an updated reader with that implementation, it turned out to be 
> really easy to implement with unread-char.  While unread-char isn't part of 
> R5RS, it's available in at least two Schemes, and we could create little 
> portability layer to implement unread-char for other Schemes.
>
> So since it's easy to implement, can you accept #4 (period + space or tab as 
> indentation)?
>
> --- David A. Wheeler

IIRC some peek-char implementations are just read-char followed by
unread-char, with only one unread-char lookahead: so the sequence of
peek-char followed by unread-char might cause strange errors about too
many unread-char.

Generally, once an implementation supports both peek-char and
unread-char without such a conflict they start supporting unlimited
unread-char, so we might as well require that.

You know, I suspect that splitting the parser into a token scanner and
a 0-lookahead (always consume next token) parser might actually be
able to parse sweet-expressions.  This is a much more different parser
and requires a full reimplementation down to #-readers though.

Otherwise, fine, #1 #2 or #4 is fine with me.

Also, latest code seems to convert .-indent into spaces, is this
deliberate?  I proposed that, but only if it allowed me to draw
something like this:

let
 \
....foo bar ; highlight this line
 .  nitz quux
 meow

Since multiple periods without intervening spaces are no longer
allowed as indent, the utility of this punning is significantly
reduced IMO.  You can remove it if you think it gives better
indentation-safety (i.e. convert the (cons #\space (accumulate-hspace
port)) call to (cons #\. (accumulate-hspace port))).

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