On Jul 21, 8:13=A0pm, p...@[EMAIL PROTECTED]
(Pascal J. Bourguignon)
wrote:
>
> >> Notice that: =A0 =A0 =A0 =A0 =A0(+ 1 (* 2 3 4) 5)
> >> is not the same as: =A0 (+ 1 (* 2 3) 4 5)
> >> so: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+ 1 * 2 3 4 5 =A0 =A0 =A0
=
=A0 =A0is meaningless.
>
> > No, I think you confuse iexpr with infix order expressions.
>
> I did not.
>
Indeed you did. ;-)
No actually you confused it with prefix.
> If all the arithmetic operators were binary, then
> =A0 =A0 + 1 * 2 3 + 4 5
The first plus takes 3 args, and is thus
not a binary operator.
> or
> =A0 =A0 + 1 * 2 * 3 4 5
This could be interpreted in many ways:
(+ 1 (* 2 (* 3 4)) 5)
(+ 1 (* 2 (* 3 4) 5))
(+ 1 (* 2 (* 3 4 5)))
If interpreted as iexp then the ***p for the above code
it would be:
(+ (1 (* (2 (3 (+ (4 5)))))))
(+ (1 (2 (3 (* (+ (4 5)))))))
iexp of the prefix interpretation of your code would be:
> + 1 * 2 3 + 4 5
> + 1 * 2 * 3 4 5
+ 1
* 2
3
+ 4
5
+ 1
* 2
* 3
4
5
> would be perfectly well defined. (For example, have a look at any HP
> calculator, where you just enter these expression in the reverse order
> to get the correct and unambiguous result).
There are many calculators that deal with postfix notation
(also called reverse-polish notation, or RPN), which again isn't
anything like
iexp.
> Anoter nice property of well balanced parentheses, it that it makes it
> trivial for editor to perform powerful structural editing functions.
And what makes it less trivial with iexp?
I would argue that it makes it easier to perform.
>
> Well, on comp.lang.c++ or on comp.lang.pascal, you may try to paste
> iexpr, nobody here would mind.
>
> But on comp.lang.lisp or comp.lang.scheme, better keep the
> parentheses, you'll make everybody happier with them.
Thanks for an answer to my question, but since you don't
even understand what iexp is, I don't think you are
qualified to answer it. When you do, answer it again.
>
> > I gained a lot switching to iexp, I don't have to match
> > all parens all the time, I just hit enter.
>
> > Before I had to format my code, and match my parens,
> > now I only have to do the first.
>
> But we don't format our code, we leave this low level task to our
> editor.
>
Do you write code without using enter, tab and backspace?
That is what I call formating.
I've actually never seen an emacs user edit lisp code,
so I really don't know.
> > That is true, but I don't use a lisp editor,
>
> Here is your error.
>
> > I use an all round editor that can edit
> > everything (for reference vim).
>
> emacs can do more. ;-)
>
Hmm, so you use a different editor for each type of
editing you want to do?


|