Re: Why is LISP syntax superior?



keke@xxxxxxx (Takehiko Abe) writes:

I think that either you like it or you hate it on the first
sight. Do not try too hard. It's futile.

[...]

Understanding macros is essential to appreciating the power of lisp,
though. IMO, if lisp didn't have its macro system, there'd be no
significant advantage over, say, Python and hardly any justification
for its (lack of) syntax.

So you tolerate the lisp's (non) syntax because of macros?
That's too bad. I guess I am a happier lisper than you.

If CL didn't have its macros, I'm pretty sure that one could find
another syntax that would lead to programs that are both shorter and
easier to read and understand than equivalent programs using s-expr
syntax. As I wrote in another post:

I think there are some cases where more syntax would be nice in
Lisp. [...] If I were to design a new programming language
without such a powerful macro system (not that I want that), I'd
probably not choose S-expressions because I think other
representations would be more suitable.

One example I gave were references to array elements. In Python you
write:

elem = seq[i]
seq[i] = new_elem

Where seq is a sequence type, i. e. a list, a tuple, a string or a
dictionary. In CL you have to write:

(let ((elem (elt seq i)))
...)
(setf (elt seq i) new-elem)

I'm sure there are other examples.

Wild guess: Some people don't like prefix notation perhaps
because they want to read the code aloud? It's not speech
oriented.

I don't know what you mean.


Wolfram

.



Relevant Pages

  • Re: Very poor Lisp performance
    ... >>> Do you mean it is difficult to implement infix in Lisp? ... > to write macros that use infix syntax? ... your language is infix it's harder to write macros because the macros ...
    (comp.lang.lisp)
  • Re: Two questions together
    ... How powerful are the macros? ... > "programmable language" and as far as I know this feature is provided ... It is also said that one can hammer the Lisp so that ... I really love Lisp's syntax:) But I just want ...
    (comp.lang.lisp)
  • Re: macro for shorter array syntax
    ... This implies that OCaml macros can be easier which, in turn, justifies my ... Lisp manuals and tutorials say macros define new syntax, ...
    (comp.lang.lisp)
  • Re: eval in bash vs macro in lisp
    ... So although I don't understand LISP macros, ... the syntax of the language. ... You can't do that in bash. ...
    (comp.lang.lisp)
  • Re: Benefits of Dynamic Typing
    ... Many dynamically typed languages (e.g. Python, ... > So I think the assertion is only true if it is changed to "Lisp's syntax is ... > is "Lisp was designed to have a simple syntax". ... So there is syntax expressed via macros or built-in special forms. ...
    (comp.lang.functional)