Unofficial Hacker News companion — get notified on comment replies, and more.

2035 came early (opens external site)

1041 points by setheron 7 days ago | fzakaria.com | 383 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (2)

  1. I like Scheme syntax but someone coming from a C-syntax background can easily understand this in the first look:

    const add = (a, b) => a + b;

    And may need to read this a couple of times because of the lone "+" and the parentheses:

    (define (add a b) (+ a b))

    ... and this is the simplest of examples. It's not slightly unfamiliar syntax. Perhaps Rust is slightly unfamiliar syntax, if we mean really just the syntax - as in, you can tell where the functions start and end.

    You could also say that Scheme has very little syntax, for example, no distinction between statements and expressions, no operator precedence, and nearly zero reserved punctuation. So I'd argue that it needs more adaptation because it is less.

    Replies (1)
    1. Scheme is better for DOMs, moots all the JSON silliness.