Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Scheme > Re: let-values ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 15 Topic 4619 of 4788
Post > Topic >>

Re: let-values with macros....

by IDK <ulvinge@[EMAIL PROTECTED] > Jul 21, 2008 at 12:49 PM

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?
 




 15 Posts in Topic:
let-values with macros....
IDK <ulvinge@[EMAIL PR  2008-07-20 06:05:07 
Re: let-values with macros....
pjb@[EMAIL PROTECTED] (P  2008-07-20 16:50:31 
Re: let-values with macros....
IDK <ulvinge@[EMAIL PR  2008-07-20 15:50:26 
Re: let-values with macros....
pjb@[EMAIL PROTECTED] (P  2008-07-21 01:24:19 
Re: let-values with macros....
"Kjetil S. Matheusse  2008-07-21 01:33:00 
Re: let-values with macros....
IDK <ulvinge@[EMAIL PR  2008-07-21 10:21:58 
Re: let-values with macros....
pjb@[EMAIL PROTECTED] (P  2008-07-21 20:13:09 
Re: let-values with macros....
Jens Axel Soegaard <fi  2008-07-21 23:25:41 
Re: let-values with macros....
IDK <ulvinge@[EMAIL PR  2008-07-21 12:49:14 
Re: let-values with macros....
pjb@[EMAIL PROTECTED] (P  2008-07-21 22:58:56 
Re: let-values with macros....
IDK <ulvinge@[EMAIL PR  2008-07-22 02:28:49 
Re: let-values with macros....
pjb@[EMAIL PROTECTED] (P  2008-07-22 14:52:36 
Re: let-values with macros....
IDK <ulvinge@[EMAIL PR  2008-07-22 14:01:02 
Re: let-values with macros....
pjb@[EMAIL PROTECTED] (P  2008-07-22 23:41:16 
Re: let-values with macros....
IDK <ulvinge@[EMAIL PR  2008-07-22 16:50:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 22:18:24 CDT 2008.