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

The first statement defines a closure. The second is an if-let statement. It's not chaotic, you're just unfamiliar with the syntax.

I actually find the Rust syntax very natural, more than C in some areas.





More than C? Highly doubt that.

Arrays are initialized with curly braces but the type notation uses brackets.

typedef takes the identifier at the end of the statement.

The asterisk is used to de-reference but used to denote a reference in types.

While loops may take the condition after the block.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: