----- Start Original Message -----
Sent: Wed, 11 Jul 2012 21:51:17 -0400 (EDT)
From: "David A. Wheeler" <dwhee...@dwheeler.com>
To: almkg...@gmail.com
Subject: Re: [Readable-discuss] Arne Babenhauserheide proposal: use "." on
 own line instead of "group"

> Alan Manuel Gloria:
> > All right all right, let's use this thread to discuss GROUP, SPLICE,
> > SPLIT, and ENLIST.
> 
> Agree.
> 
> By the way, thanks very much for creating this summary on the mailing list + 
> the info on the Wiki.  Nicely done + very helpful.
> 
> ...
> > 1.  NO to GROUP and SPLICE
> > 
> > 2.  YES to SPLIT, and use \ for it, and ignore other language's habit
> > of using it to mean "continue to next line"
> > 
> > 3.  YES to ENLIST, and use ~ for it, and really start to crystallize
> > what exactly is meant with ~ in various contexts.
> 
> > Cons to my position:
> > 
> > 1.  Both SPLIT-by-itself and ENLIST-by-itself, followed by a line that
> > is more indented, mean exactly the same thing.  This is arguably Not a
> > Good Thing, as there is now more than one way to express something,
> > neither being a truly "preferred" way.
> ...
> > 3.  Using "\" for SPLIT is not compatible with most other language's
> > usage, especially when it occurs at end-of-line.
> 
> 4. Using up two punctuation symbols.  They're in short supply.
> 
> 5. The "\" meaning is incompatible with its meaning in CL, and many other 
> Lisps (including many Scheme implementations) also use this interpretation.
> 
> We could implement both SPLIT and ENLIST, but I don't think that we really 
> need the SPLIT char to work at the beginning of a line (after indent), and 
> ENLIST could easily be limited to only apply at the beginning of a line 
> (after indent).
> 
> So here's another variant semantic that combines GROUP and SPLIT, let's call 
> it "GRIT" :-).
> 
> GRIT: - a proposed combination of GROUP and SPLIT, where a single SYMBOL is 
> used. Semantics:
> 1. If SYMBOL is at the beginning of the line (after indent), and nothing else 
> on the line (other than maybe space/tab/;-comment), then it creates a list 
> without header using all children lines, like GROUP.
> 2. If SYMBOL is anywhere after the first datum on a line, it works like 
> SPLIT.  (What if it's the last one?)

Here's a proposed third rule for SYMBOL-at-beginning for GRIT:
3. If SYMBOL is at the beginning of the line, and something else is on the list 
afterwards, it ALWAYS creates a list from what follows, EVEN IF there is only 
one datum.  (This makes it like ENLIST.)  Okay, so it's really a combo of 
ENLIST and SPLIT.

Here's my thinking - I'm particularly trying to support awkward things like 
"let".

If you use let, you can simply say "the first parameter better start with an 
indented SYMBOL".  If it's complicated, it can look like this:
. let
. . \ a(a0) b(b0)
. . . c calculate-c0()
. . . d calculate-d0()
. . do-stuff-inside-let()

Simpler versions look like:
. let
. . \ a(a0) b(b0)
. . do-stuff-inside-let()

In the above, you don't actually need "\"; it would work the same way without.

Ah, but then when you go down to one variable it still works:
. let
. . \ a(a0)
. . do-stuff-inside-let()


--- David A. Wheeler

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