Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's debatable whether "simple and regular syntax" is a strength or a weakness. Lisp/Scheme might be too regular for their own good. Consider the following statements in Scheme, for instance:

    (lambda x (+ x x))
    (cond (> x 2) (+ x x))
    (if (> x 2)
        (do-this when-true)
        (also-do-this when-true))
They are syntactically correct (technically), but they are probably not what you meant. So you still have to pause and ask yourself how cond works... except the parser will not help you.

That is to say, a problem with s-expressions is that they are so regular that everything looks the same, and when everything looks the same, it can become an obstacle to learning. Mainstream languages are not very regular, but they are more mnemonic. I think Lisp works best for a very particular kind of mind, but that for most programmers its strengths are basically weaknesses.



    (if (> x 2)
        (do-this when-true)
      (also-do-this when-true))
In some other language:

    x > 2 ? doThis(whenTrue) : alsoDoThisWhenTrue();
Same problem. Maybe even slightly worse. For example it could be:

    x > 2 ? doThis(whenTrue) ; alsoDoThisWhenTrue();
To spot the difference between a colon and the semicolon: tough.


SBCL will warn or error at compile time on the first two, and there are similar issues to the third one in many languages; it's a semantics issue more than a syntactic issue.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: