This is a problem I've thought about myself. I'm not sure if I like Arne's
solution, though, because a period is almost too small, but I would agree
that group is rather clunky too.
One thought I've been wanting to experiment with, but haven't had the time
to attempt to implement, is to use a double-indent to indicate groups. For
example,
let
group
a b
do-stuff
would become
let
a b
do-stuff
I kindof like this solution, although I haven't experimented enough with it
yet to be sure...I suspect it has its own potential pit-falls for
readability, though. For one thing, the smaller the indent, the less
likely it would be to be readable. I'd suspect that three spaces would be
a minimal requirement, perhaps even four, although I understand that for
Lispers, two-space indents are sometimes popular.
Sincerely,
Alphy Madsen.
On Mon, May 21, 2012 at 9:56 AM, David A. Wheeler <dwhee...@dwheeler.com>wrote:
> Here's an interesting idea from Arne Babenhauserheide.
>
> It's a fair point. The only reason that I used "group" was because this
> made it compatible with a previous proposal.
>
> Comments?
>
> --- David A. Wheeler
>
>
> ----- Start Original Message -----
> Sent: Mon, 21 May 2012 17:11:20 +0200
> From: Arne Babenhauserheide ( arne_bab at web dot de...)
> To: dwhee...@dwheeler.com
> Subject: sweet expressions and group (xyzzy)
>
> > Dear David A. Wheeler,
> >
> > I read your sweet expressions work and I liked it very much - except
> > for the group keyword as replacement of ((.
> >
> > Reason: I dabbled with expressionless-lisp myself, though only on
> > paper, with elisp in mind and limited experience with other lisps
> >
> > What I love about indentation-sensitive programming is that it is
> > possible to reduce the syntax to the bare necessities for
> > understanding the code. With the group-keyword you use a pretty heavy
> > identifier for (( - its actually heavier than the orgininal syntax.
> >
> > The alternative I came up with is a . on its own line. It is the
> > syntax-element which is already used and which does not normally
> > appear in front of lists.
> >
> > The . as infix creates a cons-cell, and it seems that it (. a) simply
> > is a, so it seems nonsensical to me to use (. ( anywhere.
> >
> > To use the common let syntax as comparision:
> >
> > With groups it looks like this:
> >
> > let
> > group
> > a b
> >
> > With a dot it changes to:
> >
> > let
> > .
> > a b
> >
> > This makes the syntax much lighter for the reader while still clearly
> > marking the double-brackets.
> >
> > but as with everything, just treat this as an idea. I really like
> > your sweet-expressions work!
> >
> > Best wishes,
> > Arne
> >
> > PS: I normally write in Python and love it, but I also see the power of
> lisp (mainly through customizing my emacs), so I wish it were easier to
> read.
> >
>
> ----- End Original Message -----
>
>
> ------------------------------------------------------------------------------
> 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
>
------------------------------------------------------------------------------
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