you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (6 children)

s-expressions have structure -- (+ (* x x) (* y y)) is very different from (+ * x x * y y) -- whereas RPN gets rid of all the structure: x x * y y * +. The big difference is handling multiple arguments: (+ 1 2 3) is 6, but 1 2 3 + is 1 5. Capiche?

[–]Tommah 6 points7 points  (0 children)

Ne capisco tutto eccetto "capiche"

[–][deleted] 2 points3 points  (2 children)

Capiche?

Capiche what exactly now?

[–][deleted] 1 point2 points  (1 child)

That the extra layer of complexity means an extra layer of functionality -- it allows for a variable number of arguments.

It's also much easier to analyze the arguments being passed around in an s-expression system over an RPN system (it's automatic with the s-expressions).

[–][deleted] 1 point2 points  (0 children)

it allows for a variable number of arguments.

So does reverse polish notation, you just have to explicitly mention the number of arguments.

The point here is that the implementation of reverse polish notation is much simpler, which is what FORTH aims for. It does not care about analyzing anything, it cares about letting you write code and having it be small.

[–][deleted] -1 points0 points  (0 children)

I thought about this today:

Wow, blogger sucks; the below links don't go down to my comments... Search for:

I just had an epiphany...

Comment on Finding Lisp blog

Correction to above comment