[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sweet-expressions are not homoiconic
"Jos Koot" <jos.koot@xxxxxxxxx> wrote:
> I am in favor of SRFI-110,
> for it might be very useful for people who don't
> like parentheses. For myself I probably stick to parentheses. I have no
> problems with lots of parentheses.
Okay. Inside (...) you can still use neoteric-expressions, so expressions like
cos(theta) would work and be useful.
> Although I think that indentation oriented notation can be useful for many
> people, I do not well undestand David's remark about difficulties with 10 or
> 12 closing parentheses. Where with conventional parentheses you have to type
> the correct number of parentheses, say 10, in a sweet expression you have to
> reduce the indentation by 10 steps, which to me seems as hard, especially
> when the start of the subexpression to be closed is too far above to be
> visible on the screen.
My point is that if you have 12 groupings, but denote the "big picture"
ones with indentation and the "local" ones with parens, the it's much
easier to distinguish both. Perhaps the emphasis counting parens
isn't the best way to argue this.
> For Scheme editing I use DrRacket. It has a customizable re-indent function...
There's no doubt that good editing tools are *very* helpful for Lisp.
I just think that good editing tools would work better with a better notation.
> It highlights subexpressions when placing the curser right before an opening
> or right after a closing parenthesis. It is easy to jump forward and
> backward over subexpressions. When typing a closing parenthesis, the editor
> for a moment shows which opening parenthesis you are closing, even when lots
> of lines above.
> I think the same type of editing tools would be useful for sweet
> expressions, but I would not know what part of
> to highlight or select when the cursor is at the start of the line. Should
> it only be f? Or should it be the whole line?
I think it should start with "f", as the expression is really just a shorthand for (f x).
But no doubt some experimentation would be best.
> I have the same type of
> uncertainty with:
> ! x
My guess would be "f' if you're at "x", again because this is (f x).
But again, experimentation would be the best way to answer it.
--- David A. Wheeler