in reply to An infix fix

I really wish more languages had taken the LISP route and defined all operators in prefix notation:

(+ 1 2 (* 5 6 7) 9)

I want more languages with either this or RPN. They both have their good points, but it's hard to do both.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Replies are listed 'Best First'.
Re^2: An infix fix
by Jenda (Abbot) on Mar 22, 2005 at 23:18 UTC

    Lots of Irritating Silly Paranthesis? Hope not! (I like functional languages though, it's just the syntax of Lisp that makes me dizzy.)

    And actually is the result (3 30 7 9) or 222?

    RPN? You mean Reverse Polish Notation? Oh my. Man you do have some pretty perverted tastes ;-)

    Jenda
    We'd like to help you learn to help yourself
    Look around you, all you see are sympathetic eyes
    Stroll around the grounds until you feel at home
       -- P. Simon in Mrs. Robinson

      I don't know LISP and even I know the result is 222. The prefix operators are greedy.

      Being right, does not endow the right to be rude; politeness costs nothing.
      Being unknowing, is not the same as being stupid.
      Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
      Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

        It's quite a few years since I did anything with Lisp myself so I do not know whether the + and * was made to accept a variable number of parameters or just two. Suppose you defined a function yourself and it expected two parameters, what would the result of (foo 1 2 3) be then? The same as (foo 1 2) or ((foo 1 2) 3) or even (foo (foo 1 2) 3) or (foo 1 (foo 2 3))?

        Jenda
        We'd like to help you learn to help yourself
        Look around you, all you see are sympathetic eyes
        Stroll around the grounds until you feel at home
           -- P. Simon in Mrs. Robinson

      It's all about efficiency, both of the computer and yourself. LISP has an extremely simple grammar and makes it easy to operate on large lists. RPN lets you do away with operator precedence tables without using parans.

      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Re^2: An infix fix
by Anonymous Monk on Mar 23, 2005 at 03:25 UTC
    Yuck.

    (not readable (Lisp is) unless (like Yoda (you speak) ))

    What's more:

    if ( $perl{readiblity} > $lisp{readibility} ) { $lisp{readibilty} = "Bad"; }

    --
    Ytrew

      > (not readable (Lisp is) unless (like Yoda (you speak) ))
      
      I am already digging it.
      
      More prefix notations please!