help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to improve the readability of (any) LISP or any highlevel functi


From: Jan Burse
Subject: Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?
Date: Fri, 21 Jan 2011 17:15:52 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.16) Gecko/20101123 SeaMonkey/2.0.11

I am voting for RPL:
http://en.wikipedia.org/wiki/RPL_(programming_language)

m_l_g3 schrieb:
On Jan 1, 10:04 am, girosenth<girose...@india.com>  wrote:
How to improve the readability of (any) LISP or any highlevel
functional language to the level of FORTH ?

...

How do you make it readable ?
...

(f (g (h (j (k (l ops)))...)))

(e
    (f
       (g (h i)
          (j k l)
       )
       (m (n o (p q))
          (r (s t) u)
)  )  )

The rule: if you don't see the closing paren moving the eyes down,
it's on the right.
But it either to the right or down, no other option.

Since closing parens are visually identical, there's no need to one
line per paren;
this is shown at the last line (yes, their visual and logical
orderings are different,
but they are identical parens otherwise worth only counting!).



Is there a postfix functional language that also gets rid of parens
and is not as primitive as FORTH or POSTSCRIPT ?

There is a prefix/infix one: Haskell with its ($) and (.) operators
and... well... monads.

As to Forth, you may try to layout control structures on the right,
as if RPN is not enough:

: MAX   2dup>       if
             drop    else
             nip     then
;

: foo
   10 0               do
      i 3 mod 0= if
         i .     then loop
;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]