Re: merits of Lisp vs Python



Jon Harrop wrote:
David Steuber wrote:
Well the editor does the matching. It certainly didn't take too long
for me to stop paying much attention to the parentheses. In fact, I
bet $1 that you are more likely to find superfluous parenthesis in a C
or C like program than in a Lisp program.

That brings me onto another criticism of Lispers: they have a different
definition of "superfluous" to me. Consider the following OCaml/F#:

let a, b = 2, 3 in a + b

and the Lisp equivalent:

(let ((a 2) (b 3)) (+ a b))

The OCaml has no parentheses. That doesn't mean the Lisp's are all
superfluous because OCaml has traded some of those parentheses (e.g.
for "let" and "in") but we need to do a token count. OCaml 12 vs Lisp 18.
So Lisp has 6 "unnecessary" or superfluous tokens. That isn't so important
because the byte count is virtually the same.

But this gets a lot worse when expressions written with conventional syntax
exploit precedence. For example, F# vs Lisp token count:


Well, lets see your F# Concentration program then. Perhaps a meaningful
comparison can then be made.

Still waiting with baited breath, though I will probably pass out soon.

Wade
.



Relevant Pages

  • Re: SBCL is now faster than Java, as fast as Ocaml, and getting better
    ... (labels ((aux (lam normal scene) ... Note that the Lisp was written by Juho Snellman, one of the authors of SBCL, ... Your pattern match for the list case requires three tokens: ... Only if you ignore the superfluous parentheses that make up most of the Lisp ...
    (comp.lang.lisp)
  • Re: SBCL is now faster than Java, as fast as Ocaml, and getting better
    ... Still requires explicit deconstruction in Lisp but not in OCaml. ... Only if you ignore the superfluous parentheses that make up most of the ... expression in some language. ... around comma-separated lists, when those lists are to be treated as a ...
    (comp.lang.lisp)
  • Re: merits of Lisp vs Python
    ... for me to stop paying much attention to the parentheses. ... or C like program than in a Lisp program. ... The OCaml has no parentheses. ... You know that there are infix macros for Lisp that allow me to write ...
    (comp.lang.lisp)
  • Re: "and" operations
    ... I wrote a reasonably functional Lisp interpreter. ... the parentheses, of course, and you can also resort to tricks like ... and gradually moving into other languages. ...
    (comp.lang.c)
  • Re: right square bracket and repl questions
    ... Some Lisps had a superbracket. ... do you close all objects that have parentheses, ... you cannot recurse into the Lisp reader functions like read-delimited-list, ... This might have to be done at the stream level; ...
    (comp.lang.lisp)