Subject: Re: About those parenthesis....
From: rpw3@rpw3.org (Rob Warnock)
Date: Wed, 11 Jan 2006 21:57:23 -0600
Newsgroups: comp.lang.lisp
Message-ID: <28CdnZmSYtQ-TljeRVn-sA@speakeasy.net>
<nallen05@gmail.com> wrote:
+---------------
| Rob Warnock wrote:
| >But an earlier, much less featureful hack *is* easy in CL... 
| >    opfr> expt x y
| >    193630125104980427932766033374162714624
| >    opfr> expt x (- y 12)
| >    81138303245565435904
| >    > mod ** 9
| >    7
| >    opfr>
| 
| Cool. It reminds me of something... but I don't know what though...
...
| ahah, I know now!
| 
| It's Dylan!
+---------------

Well, uh, yes, sorta.  ;-}  Except Dylan v.2 used infix for
subexpressions, didn't it?

+---------------
| hrm I couldn't write
| >>> if t
| ...      'true
| ...      'false
| I guess this is a testament to the amount of semantics packed into such
| a simple schema of homogenous delimiters.
+---------------

I got around that by stealing the "escape newline with \" hack
from Tcl:

    opfr> if t \
	    'true \
	    'false

    TRUE
    opfr> loop for x from 1 to 10 collect x

    (1 2 3 4 5 6 7 8 9 10)
    opfr> loop for x from 1 to 10 \
	    collect x

    (1 2 3 4 5 6 7 8 9 10)
    opfr> loop for x from 1 to 10 \
	       and y = (expt 1 x) \
	    collect (cons x y)

    ((1 . 1) (2 . 1) (3 . 1) (4 . 1) (5 . 1) (6 . 1) (7 . 1) (8 . 1)
     (9 . 1) (10 . 1))
    opfr> 

Ugly, but as you noted, once you give up simple parens all *kinds*
of cruft creeps in...  ;-}

+---------------
| > Nevertheless, experience with real users over more than a decade
| > has shown that theacceptance of the OPFR syntax to the average user
| > is *enormously*greater than the "pure" Lisp s-expr. Go figure.
| 
| Perhaps parens infer a necessitated demarkation to someone used to
| infix syntax? (thus, when encasing the outer-most expression, they
| imply some sort of a dependent clause or single object instead of  an
| independent expression...)
+---------------

I dunno. What I do know is that people who would tilt up their noses
or gag or run screaming from the room and refuse to use a tool that
made you type this:

    > (ecc-dump)
    ...[lots of chatter]...
    > (ecc-clear)
    > (ecc-scan 0 #x200000)
    > (mem-fill (+ bar1 #x100) #x100 0)
    > 

had no objections at all to typing this:

    > ecc-dump
    ...[lots of chatter]...
    > ecc-clear
    > ecc-scan 0 0x200000
    > mem-fill (+ base-reg-1 0x100) 0x100 0
    > 

So guess which one I gave them?   ;-}  ;-}


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607