[Melbournepm] Dancing around the event horizon
Sam Watkins
sam at nipl.net
Thu Jun 4 00:30:01 PDT 2015
> Okay, Toby. You've now got me looking at Clojure as an option.
>
> I'd definitely enjoy cutting code in that more than I would Python.
If only someone would invent a good LISP/Scheme dialect that is as
readable as Python. LISP and especially Scheme are good simple
languages but I find Python much more readable (and it's a very popular
language, largely because it's so readable).
On the other hand, LISP code can be more compact, so there's less to read.
Of course, when compared to perl...
Reading difficulty:







 
  
py lisp perl
For more readable LISP, I figure we need implicit parens around lines,
and encompassing any indented block argument:
define
largesttwosquaresum x y z
if (= x (larger x y))
sumofsquares x (larger y z)
sumofsquares y (larger x z)
define
larger x y
if (> x y) x y
define
sumofsquares x y
+ (square x) (square y))
define
square x
* x x
Is more readable to me than:
(define
(largesttwosquaresum x y z)
(if (= x (larger x y))
(sumofsquares x (larger y z))
(sumofsquares y (larger x z))
)
)
(define
(larger x y)
(if (> x y) x y)
)
(define
(sumofsquares x y)
(+ (square x) (square y))
)
(define
(square x)
(* x x)
)
I have a feeling it's not so simple, though.
More information about the Melbournepm
mailing list