On Fri, 09 May 2014 13:58:50 +0200, "Jörg F. Wittenberger"
> continuing on alias tokens for collecting lists.
>
> Two aspects have made my feelings stronger that I'd actually like {* and
> *}: A) As noted before, users usually know how to key them in. B) My
> emacs will make it easy to skip over the block in most editing modes.
>
> To get a feeling what it would take I go my hands dirty. Resulting diff
> below. Note that this code is a dirty hack by now. Where
> `my-read-delimited-list` returns '<* I should probably attach source
> info, shouldn't I?
Almost certainly yes, though I haven't examined it in detail.
> Let alone that I tend to believe that the token ought
> to be generated more generic. Furthermore there should be a
> configuration option to switch it off entirely as the other reader
> features already have.
>
> There is one more nice thing if the alias was actually to work correct:
> one could drop two more characters from the special set the programmer
> has to be aware of < and >.
>
> So far there is only so much test coverage. But I have not yet managed
> to write a test case which returns surprising results.
>
> To my current knowledge there is actually only one user-visible change
> besides {* *} becoming an alias for <* *>: the way one has to actually
> get a symbol "star" read after a {: separate it by white space to avoid
> it being taken as opening a collecting list. Is this actually all the
> damage it did? What am I missing?
This would mean that {* x *} would be interpreted *differently*
by a curly-infix reader (or a neoteric reader) compared to a sweet-expression
reader.
You might want to thoroughly test what happens as you vary the number
of parameters inside {*...*}, to ensure that you're aren't reordering in that
case.
For the Scheme implementation, I don't see any other issues offhand.
I'm not really a fan of the approach, but experimentation is always useful.
It's not clear that it'd be as easy to tweak the current Common Lisp
implementation.
The sweet-reader, once it sees "{", immediately dispatches to the reader until
}.
You might need to insert some additional logic to ensure that it doesn't do the
reordering that is normally done inside {...}.
--- David A. Wheeler
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Readable-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/readable-discuss