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

Any decent programming editor will be able to indent that properly and you will see the problem. Also, I agree that it is a bit ugly but it's not that complicated to understand how the match syntax works. Adding a "begin" and an "end" in this code is simple enough :).


It's not just the match syntax; it's also the `;` expression separator.

> Any decent programming editor will be able to indent that properly and you will see the problem.

This seems like a weak excuse. In particular, I could turn it around and say, "any decent programming language should be writable without an editor". Also, the issue isn't just reading, it's writing too - it's much harder to foresee/plan all the `begin`/`end`, while you're writing a line of code, that will make the lines that follow work as intended.


> This seems like a weak excuse. (…)

Fair enough, but for the ';', as others explained meanwhile, I think it's pretty simple to understand, it's just that we are not used to it because of C syntax.

EDIT: actually, you are right about ';', it is confusing when I think about it: it does not have the same behavior in a branch of a `match` and in the branch of an `if`… I wonder how I never had problem with that before.


It depends on the learning path of each one.

In the Pascal family of languages, ';' is a separator as well.




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

Search: