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

There are plenty of languages that don’t require semicolons and yet manage to avoid those issues: Clojure, Go, Odin…


Clojure delineates everything by explicitly putting statements in parentheses (like any LISP). That's basically the same thing.

Go is an interesting example but it gets away with this by being far stricter with syntax IIRC (for the record, I'm a fan of Go's opinionated formatting).


Also Scala


Funny enough, Go’s grammar does require semicolons. It avoids needing them typed in the source code by automatically adding them on each newline before parsing.


On almost every newline, which is the reason why this doesn't work:

    func thing()
    {
I quite like this approach. It's very simple and consistent, and once you know how it works it's not ever surprising.




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

Search: