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

How does Rust make it any easier?


All clauses are defined within curly brackets like C so indentation has no meaning and you can let tools take care of that.


Also, with editors like vim, you can press % to go to the matching brace (curly bracket). In fact that works in vi too, right from the early vi days; also, in vim, if you position the cursor on an opening or closing brace, it momentarily highlights the other one (at least if that brace is visible on the screen, can't remember offhand if this works even if not visible).

I still like languages like Python and F# though.


But is it any easier to tell which clause an else is connected to? Python has tools too.


When you refactor, yes. In python, say you add a new condition inside a condition, it's really easy to get lost and indent the wrong one to the wrong level.




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

Search: